Contents

Which operator is used to assign values to variables?
a) arithmetic operator               
b) assignment operator
c) compound assignment operator
d) increment and decrement operator

b

What type of operators are used to perform common mathematical operations?
a) arithmetic operator
b) assignment operator
c) compound assignment operator
d) increment and decrement operator

a

How many types of arithmetic operators are used in mathematics?
a) three
b) four
c) five 
d) six

c

Explanation: addition (+), subtraction (-), multiplication (*), division (/), modulus (%)



Which operator is used to modify the value of variable by performing an operation on the value that is currently stored in variable?
a) arithmetic operator               
b) assignment operator
c) compound assignment operator
d) increment and decrement operator

c

How many types of compound assignment operators are used in mathematics?
a) three
b) four
c) five 
d) six

c

Explanation: addition assignment (+=), subtraction assignment (-=), multiplication assignment (*=), division assignment (/=), modulus assignment (%=)



Which of the following are examples of prefix and postfix increment?
a) ++x                         
b) x++
c) both a & b               
d) x--

c