Q. Which of the following is the correct way to initialize a string in C++?
β
Correct Answer: (B)
string str = "Hello";
Explanation: In C++, strings are initialized with double quotes. 'string str = "Hello";' is the correct way.