
C++ 40Questions
Authored by Thanuja V
Computers
8th Grade
Used 1+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
40 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following statements is used to add single line comments in C++?
// This is a comment
/* This is a comment */
<!-- This is a comment -->
// This is a comment //
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you input data from the user in C++?
cin
cout
endl
scanf
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you output data to the console/output in C++?
cin
cout
endl
printf
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which manipulator is used to insert a new line in the output stream?
cin
cout
endl
printf
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is not a valid variable name in C++?
myVariable
123abc
_variable
variable2
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you concatenate two strings in C++?
str1 + str2
str1 . str2
str1 & str2
str1 : str2
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which operator is used for logical AND in C++?
&&
||
!
&
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?