Ask your own question, for FREE!
Computer Science 11 Online
OpenStudy (anonymous):

i need help with a C++ practical question: strings

OpenStudy (anonymous):

what is your question?

OpenStudy (anonymous):

when a user inputs a string, program has to cout: 1) the full sentence 2) the first character 3) amount of characters 4) the lasr character 5) amount of upper case letters 6) character with the largest ASCII value to answer 1) cout << string << endl; i hope its correct?

OpenStudy (espex):

Assuming your input variable is a string, named string, then that would output the sentence typed.

OpenStudy (rsmith6559):

Conceptually, you're correct. Using "string", which I believe is a reserved (you can't use it) word in C++, will probably error.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!