C++ programming
Quiz by Sandhya
Feel free to use or edit a copy
includes Teacher and Student dashboards
Measure skillsfrom any curriculum
Measure skills
from any curriculum
Tag the questions with any skills you have. Your dashboard will track each student's mastery of each skill.
With a free account, teachers can
- edit the questions
- save a copy for later
- start a class game
- automatically assign follow-up activities based on students’ scores
- assign as homework
- share a link with colleagues
- print as a bubble sheet
25 questions
Show answers
- Q1What is the difference between '++x' and 'x++' in C++?'++x' decrements the value of x and then returns the updated value, while 'x++' returns the value of x and then decrements it'++x' returns the value of x and then increments it, while 'x++' increments the value of x and then returns the updated value'++x' increments the value of x by 2, while 'x++' increments the value of x by 1'++x' increments the value of x and then returns the updated value, while 'x++' returns the value of x and then increments it30s
- Q2What is a variable in C++?A loop control structureA mathematical equationA condition in an if statementA named storage location in memory30s
- Q3What is the result of the logical expression (3 > 7) || (2 <= 4)?nulltrueundefinedfalse30s
- Q4What is the result of the logical expression !(10 <= 5)?truenullundefinedfalse30s
- Q5What is the correct syntax to declare and initialize an integer variable called 'count' with a value of 10 in C++?int 10 = count;10 = count;count = 10;int count = 10;30s
- Q6What is the difference between '==' and '!=' operators in C++?'==' compares if two values are not equal, while '!=' compares if two values are equal'==' compares if two values are equal, while '!=' compares if two values are not equal'==' compares if two values are less than, while '!=' compares if two values are greater than'==' compares if two values are greater than, while '!=' compares if two values are less than30s
- Q7Which logical operator is used to perform a logical AND operation in C++?&||!&&30s
- Q8Which logical operator is used to perform a logical OR operation in C++?|||!&&30s
- Q9Which logical operator is used to perform a logical NOT operation in C++?!&&||&30s
- Q10What does the '>' operator do in C++?Compares if one value is less than anotherCompares if one value is greater than anotherAssigns a value to a variableCompares if two values are equal30s
- Q11What does the '<' operator do in C++?Compares if two values are equalCompares if one value is greater than anotherAssigns a value to a variableCompares if one value is less than another30s
- Q12What does the '>=' operator do in C++?Compares if one value is greater than or equal to anotherCompares if one value is less than or equal to anotherAssigns a value to a variableCompares if two values are equal30s
- Q13What does the '<=' operator do in C++?Compares if one value is greater than or equal to anotherCompares if one value is less than or equal to anotherCompares if two values are equalAssigns a value to a variable30s
- Q14What does the '==' operator compare in C++?Checks if a value is greater than anotherCompares if two values are not equalAssigns a value to a variableCompares if two values are equal30s
- Q15What does the '!=' operator compare in C++?Compares if two values are equalAssigns a value to a variableCompares if two values are not equalChecks if a value is greater than another30s