C++ Strings Quiz - Question 3

Last Updated :
Discuss
Comments

Which of the following is a correct way to initialize a string in C++?

string str = "Hello";

string str("Hello");

string str{"Hello"};

All of the above

Share your thoughts in the comments
Article Tags :