Question 1: C++ String Declaration
Which is the correct way to declare a string in C++ using the Standard Library?
Question 2: C++ Guess the Output – String Initialization
What will the following code print?
Question 3: C++ String Length
Which function is used to get the length of a string in C++?
Question 4: C++ Guess the Output – String Concatenation
What will be the output of this code?
Question 5: C++ Character Access
How can we access the 3rd character of a string s?
Question 6: C++ Guess the Output – String Substring
What will the following code print?
Question 7: C++ String Comparison
Which operator can be used to compare two strings in C++?
Question 8: C++ Guess the Output – String Append
What will the output of the following code be?
Question 9: C++ String to C-Style String
Which function is used to convert a C++ string to a C-style character array?
Question 10: C++ Guess the Output – String Replace
What will this code print?