Q18
Which of the following correctly defines a string variable named name initialized with the value "John" in C++?
A.
string name = "John";
AnswerB.
char name[] = "John";
C.
char* name = "John";
D.
string name("John");
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board