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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 10:30, JeroMii
Think about a recent customer service experience - either positive or negative. write a brief summary of that experience. now think about those four characteristics we look for in customer service representatives. how did the representative in your example stack up? write down your answer and give specific examples.
Answers: 1
image
Computers and Technology, 24.06.2019 18:20, 12375819
Use a while-end loop in a script file to calculate the sum of the first n terms of the series: summation sign on the top n bottom k=1 : )^k * k^2 +5k)/3^k show the script file and the two results of n = 10 and n = 20.
Answers: 2
image
Computers and Technology, 24.06.2019 21:00, genyjoannerubiera
When replacing a thermostat or water pump, coolant drained from the cooling system should be
Answers: 1
image
Computers and Technology, 24.06.2019 22:30, jadelovell21
The a great imaginary circle, or reference line, around earth that is equally distant from the two poles and divides earth into the northern and southern hemispheres.
Answers: 1
You know the right answer?
The following 4 lines of c++ code, use strings.
string firstname; // define a string object <...

Questions in other subjects: