Page 41 - Modular_V2.0_C++_Flikpbook
P. 41
Relational operators are used to compare the value of the two operands and return True or
False accordingly.
Logical operators are used to combine more than one relational expression.
Assignment operators are used to assign the value of the right-hand operand to the left-hand
operand.
C++ provides increment (++) and decrement (– –) operators which are used to increase or
decrease the value of a variable by 1.
A ternary operator requires three operands to work.
An expression is a combination of variables, values, and operators that follow the rules of the
language to produce a value.
Type casting refers to the process of converting a value from one data type to another.
Exercise
A. Tick ( ) the correct option.
1. Which of the following is not a category of operators in C++?
a. Arithmetic b. Logical
c. Relational d. Scientific
2. Which of the following operators is used to increase the value of a variable by 1?
a. Assignment b. Ternary
c. Increment d. Decrement
3. Which type of operators need two operands to work?
a. Unary b. Binary
c. Ternary d. None of these
4. Which of the following is a combination of variables or values with operators?
a. Relation b. Operator
c. Condition d. Expression
5. Which of the following determines the order of evaluation when more than one operator with
same precedence is used in an expression?
a. Associativity b. Typecasting
c. Relationship d. Expression
B. Write 'T' for true and 'F' for false.
1. The conditional operator is the only ternary operator available in C++. ……………………
2. Logical operators are used to combine more than one relational expression. ……………………
3. An operator is a symbol used to perform mathematical and logical calculations. ……………………
39
Operators in C++

