Vidyalelo
C++ Programming · all questions

Operators and Expressions in C++
practice.

Practice every MCQ with options. Use Show answers when you want the correct option and solution.

36

Questions

1/2

Page

Pick an option on a question to see the right answer and solution.

What will be the result of the expression: 5 + 3 * 2 in C++?

Select an option to see the answer and solution.

What is the operator precedence of the multiplication operator (*) in C++?

Select an option to see the answer and solution.

What will be the output of the following code: cout << (5 == 5); in C++?

Select an option to see the answer and solution.

What is the result of the expression: 10 / 3 in C++?

Select an option to see the answer and solution.

Which of the following operators is used to access the address of a variable in C++?

Select an option to see the answer and solution.

What will be the value of 'x' after executing the code: int x = 5; x += 3; in C++?

Select an option to see the answer and solution.

Which of the following is a unary operator in C++?

Select an option to see the answer and solution.

What does the modulus operator (%) do in C++?

Select an option to see the answer and solution.

What is the output of the following code: cout << (10 != 10); in C++?

Select an option to see the answer and solution.

Which of the following is not a relational operator in C++?

Select an option to see the answer and solution.

What will be the value of 'x' after executing the code: int x = 10; x--; in C++?

Select an option to see the answer and solution.

What is the result of the expression: 2 * 3 + 5 / 2 in C++?

Select an option to see the answer and solution.

What is the output of the following code: cout << (true && false); in C++?

Select an option to see the answer and solution.

What is the operator associativity of the assignment operator (=) in C++?

Select an option to see the answer and solution.

What is the result of the expression: 5 + 3 * 2 in C++?

Select an option to see the answer and solution.

What is the purpose of the modulo operator (%) in C++?

Select an option to see the answer and solution.

What will be the output of the following code: cout << (5 == 5.0); in C++?

Select an option to see the answer and solution.

Which operator is used to access the memory address of a variable in C++?

Select an option to see the answer and solution.

What is the result of the expression: 3 * (4 + 2) in C++?

Select an option to see the answer and solution.

What does the '++' operator do when used as a postfix operator?

Select an option to see the answer and solution.