Question 1
Which operator is having the highest precedence in C++?
array subscript
static_cast
Scope resolution operator
dynamic_cast
Question 3
Which statement checks if a number is negative?
if (x > 0)
if (x < 0)
if (x == 0)
if (x >= 0)
Question 4
What does the following code output?
int x = 4;
x *= 2 + 3;
cout << x;
20
14
10
Compilation Error
Question 5
What does the sizeof operator return?
The memory address of a variable
The number of variables in a scope
The size (in bytes) of a variable or data type
The value of the variable
Question 6
Which of the following is the correct associativity of the assignment operator (=)?
Left to Right
Right to Left
Top to Bottom
No associativity
There are 6 questions to complete.