# C++ programming

## Quiz by Sandhya

### Our brand new solo games combine with your quiz, on the same screen

Correct quiz answers unlock more play!

25 questions
• Q1
What 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 it
30s
• Q2
What is a variable in C++?
A loop control structure
A mathematical equation
A condition in an if statement
A named storage location in memory
30s
• Q3
What is the result of the logical expression (3 > 7) || (2 <= 4)?
null
true
undefined
false
30s
• Q4
What is the result of the logical expression !(10 <= 5)?
true
null
undefined
false
30s
• Q5
What 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
• Q6
What 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 than
30s
• Q7
Which logical operator is used to perform a logical AND operation in C++?
&
||
!
&&
30s
• Q8
Which logical operator is used to perform a logical OR operation in C++?
|
||
!
&&
30s
• Q9
Which logical operator is used to perform a logical NOT operation in C++?
!
&&
||
&
30s
• Q10
What does the '>' operator do in C++?
Compares if one value is less than another
Compares if one value is greater than another
Assigns a value to a variable
Compares if two values are equal
30s
• Q11
What does the '<' operator do in C++?
Compares if two values are equal
Compares if one value is greater than another
Assigns a value to a variable
Compares if one value is less than another
30s
• Q12
What does the '>=' operator do in C++?
Compares if one value is greater than or equal to another
Compares if one value is less than or equal to another
Assigns a value to a variable
Compares if two values are equal
30s
• Q13
What does the '<=' operator do in C++?
Compares if one value is greater than or equal to another
Compares if one value is less than or equal to another
Compares if two values are equal
Assigns a value to a variable
30s
• Q14
What does the '==' operator compare in C++?
Checks if a value is greater than another
Compares if two values are not equal
Assigns a value to a variable
Compares if two values are equal
30s
• Q15
What does the '!=' operator compare in C++?
Compares if two values are equal
Assigns a value to a variable
Compares if two values are not equal
Checks if a value is greater than another
30s

Teachers give this quiz to your class