C++ Review Questions - Basics
Review C++ operators and conditional statements with questions on arithmetic, assignment, relational, and logical operators, if-else logic, and nested conditions.
1. Basics
Operators: Basics
Answer the following questions.
- What is an operator?
- What is an operand?
- What is an expression?
- What is a unary operator?
- What is a binary operator?
- What is the purpose of
+? - What is the purpose of
%? - What is the difference between
=and==? - What is the difference between
++xandx++? - What is the purpose of
--? - What does
>=mean? - What does
!=mean? - What is the purpose of
&&? - What is the purpose of
||? - What does
!do? - What is the difference between
x += 5andx = x + 5? - What does
x *= 2do? - What is the result of
20 % 6? - What does a relational operator return?
- Why are logical operators used with conditions?