
C++ String Manipulation
Authored by Summer Ehresman
Computers
10th - 12th Grade
Used 71+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
15 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
The concatenation operator is what in C++?
=
,
+
""
2.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
To make a string uppercase I would use which function?
uppercase()
upper()
makeUpper()
transform()
3.
MULTIPLE CHOICE QUESTION
1 min • 1 pt
If I had the following code what will display?
string word = "Purdue";
int x = word.length();
cout<<x<<endl;
5
6
7
nothing
4.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the variable word be after this code?
string word = "Chase Ross";
word.erase(0,4);
Chase Ross
e Ross
se Ross
Chase
5.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
What will the variable word be after this code?
string word = "Chase Ross";
word.erase(6);
Chase Ross
Chase
Ross
e
6.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
string word = "Jacob Tallman";
string w2= word.substr(0,2)
What letters are in w2?
Jacob Tallman
cob Tallman
Ja
Jac
7.
MULTIPLE CHOICE QUESTION
2 mins • 1 pt
string word = "Carter Franklin";
string w2= word.substr(7,5);
What letters are in w2?
Carter
Frank
Franklin
Carter Franklin
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?