c homework help

Type in program 7.6 An Example of a Bank Account from your textbook. Play with with–make sure it works.

Next, read section 7.6 and following the instructions/guidance to break program 7.6 up into three separate files.

Upload your three files using these names:

Application: p7-6.cpp (this is where you main() function lives).

Interface file: bankClass.cpp (class definition)

Implementation file: bankAccountFuncs.cpp (member function definition)

  • Which of the following statements are valid definitions for a C-string?

char str [ ] = {’H’, ’e’, ’l’, ’l’ ’o’};

const char str [ ] = {’H’, ’e’, ’l’, ’l’ ’o’};

  • Which of the following statements are valid definitions for a C-string?

char str [ ] = “Hello”;

const char str [ ] = “Hello”;

  • Which of the following statements are valid definitions for a C-string?

char∗ str = “Hello”;

const char∗ str = “Hello”;

  • What is the result of the following two statements?

const char* str1 = “Fun”;

const char* str2 = str1;

  • What is printed from the following lines of code?

const char* str = “This is a sample.”;

char* p = strchr (str, ’s’);

cout << *(p + 2);

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *