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.
+1
Answers (1)
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “The following 4 lines of C+ + code, use strings. string firstName; / / Define a string object char lastName[7]; / / Define a C-string ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Home » Computers & Technology » 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";