subject

The following 4 lines of c++ code, use strings.
string firstname; // define a string object
char lastname[7]; // define a c-string
firstname = "abraham"; // assign a value to the string object
lastname = "lincoln"; // assign a value to the c-string. which of the following statements is /are true?
a) the string object is defined incorrectly because no size is given for it.
b) the 2 strings definitions are correct, but the 2 assignment statements are wrong.
c) the string object is assigned a value correctly, but the c-string is not.
d) the c-string is assigned a value correctly, but the string object is not.
e) all 4 lines of codes are correct.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 03:00
What are the different parts of computer
Answers: 2
question
Computers and Technology, 24.06.2019 11:00
In three to five sentences, describe how you can organize written information logically and sequentially
Answers: 1
question
Computers and Technology, 25.06.2019 02:00
Feedback is one of the basic elements games have in common true false
Answers: 2
question
Computers and Technology, 25.06.2019 17:50
Does anybody have the answers for game design i a unit 6: game design i a final exam i really need i am so flustered right now and i know that this is a lot to ask but i really need .
Answers: 3
You know the right answer?
The following 4 lines of c++ code, use strings.
string firstname; // define a string object <...
Questions
question
Mathematics, 17.09.2019 00:00
Questions on the website: 13722367