iLoveDoingWork3959 iLoveDoingWork3959
  • 12-09-2019
  • Computers and Technology
contestada

Assuming that a program has the following string object definition, which statement correctly assigns the string literal "Jane" to the string object?
string name;
name = "Jane";
string name = {Jane};
name = 'Jane';
name = Jane;

Respuesta :

Branta Branta
  • 13-09-2019

Answer:

name="Jane";

Explanation:

In C++ assigning a value to a string object takes the following syntax:

String variable declaration prior to the assignment using:

string <variable-name>;

String variable assignment:

<variable-name> = "<variable-value>";

As per the question, the variable-name is 'name' and variable-value is 'Jane'. So the required assignment has the format:

string name;

name="Jane";

Answer Link

Otras preguntas

Joseph has a coin and a number cube. The number cube is labeled 1 -6. He flips the coin once and rolls the number cube once. What is the probability that the co
3/7 of what number is 9? How am I suppose to figure this out?
Which religion in India combines the Muslim belief in one God with the Hindu belief in reincarnation?
What number divided by 8 equals 7
Can some one help me with this how many kilograms is this ??? Really need help
The Miller family visited Mama's kitchen and ordered 4 hamburgers and 3 medium fries and paid $17.35. James ordered a medium drink , and a hamburger , and mediu
What is the value of this please help
How do I write the equation of the line when using (-4,18)?
What are the next three numbers in this pattern? 6,000 6,003 6,009 6,018 6,030 6,045 ... .. ...
What happens when a solid object with a lower density is placed in a liquid with a greater density?