Which of the following is the correct format for ternary operator?
a) condition, exp1 and exp2
b) exp1, condition, exp2
c) exp1, exp2, condition
d) none of these
How many relational operators are used in mathematics?
a) four operators
b) five operators
c) six operators
d) seven operators
Explanation: greater than (>), less than (<), greater than or equal to (>=), less than or equal to (<=), equality (==), not equal (! =)
How many types of increment and decrement operator?
a) one
b) two
c) three
d) four
Explanation: prefix increment, postfix increment, prefix decrement, postfix decrement
Which of the following are examples of prefix and postfix increment?
a) ++x
b) x++
c) both a &b
d) x--
Which of the following are examples of prefix and postfix
decrement?
a) --x
b) x--
c) both a & b
d) x++
How many types of compound assignment operators are used in mathematics?
a) three
b) four
c) five
d) six
Explanation: addition assignment (+=), subtraction assignment (-=), multiplication assignment (*=), division assignment (/=), modulus assignment (%=)