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

hehehehe hahaha, do delete my question Or I will report you all
Solve the equation 2x²+ 8x - 1 = 0 by completing the square. Give your answers correct to 2 decimal places.
I need help with this please help me
What’s the value of (a)?
In which era did mammals emerge? A: Cenozoic B: Mesozoic C: Paleozoic D: Precambrian.
Which is true of vapor pressure?
Nakeisha is a songwriter who collects royalties on her songs whenever they are played in a commercial or a movie. Nakeisha will earn $30 every time one of her s
Need help asap with these 4 quiestions. will give brainliest. all are linked as pictures, one has the figure and question and another picture for the answers to
it is a summer holiday write in your diary about a week you spend at home during the holidays describe the new things you saw or learn everyday ​
i really need help with this