Q40
What is the correct syntax to declare a string literal in C++?
A.
const char* str = "Hello";
AnswerB.
string str = "Hello";
C.
char* str = "Hello";
D.
char str[] = "Hello";
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board