250+ TOP MCQs on Arithmetic Operators and Answers

’s MCQs on C helps anyone preparing for placement in Infosys and other companies. Anyone looking for Infosys placement papers should practice these questions continuously for 2-3 months, thereby ensuring a top position in placements.

Here is a listing of C test questions on “Arithmetic Operators” along with answers, explanations and/or solutions:

1. What will be the output of the following C code?

  1.     #include 
  2.     void main()
  3.     {
  4.         int a = 3;
  5.         int b = ++a + a++ + --a;
  6.         printf("Value of b is %d", b);
  7.     }

a) Value of x is 12
b) Value of x is 13
c) Value of x is 10
d) Undefined behaviour
Answer: d
Clarification: None.

2. What is the precedence of arithmetic operators (from highest to lowest)?
a) %, *, /, +, –
b) %, +, /, *, –
c) +, -, %, *, /
d) %, +, -, *, /
Answer: a
Clarification: None.

3. Which of the following is not an arithmetic operation?
a) a * = 10;
b) a / = 10;
c) a ! = 10;
d) a % = 10;
Answer: c
Clarification: None.

4. Which of the following data type will throw an error on modulus operation(%)?
a) char
b) short
c) int
d) float
Answer: d
Clarification: None.

5. Which among the following are the fundamental arithmetic operators, i.e, performing the desired operation can be done using that operator only?
a) +, –
b) +, -, %
c) +, -, *, /
d) +, -, *, /, %
Answer: a
Clarification: None.

6. What will be the output of the following C code?

  1.     #include 
  2.     int main()
  3.     {
  4.         int a = 10;
  5.         double b = 5.6;
  6.         int c;
  7.         c = a + b;
  8.         printf("%d", c);
  9.     }

a) 15
b) 16
c) 15.6
d) 10
Answer: a
Clarification: None.

7. What will be the output of the following C code?

  1.     #include 
  2.     int main()
  3.     {
  4.         int a = 10, b = 5, c = 5;
  5.         int d;
  6.         d = a == (b + c);
  7.         printf("%d", d);
  8.     }

a) Syntax error
b) 1
c) 10
d) 5
Answer: b
Clarification: None.

Leave a Reply

Your email address will not be published. Required fields are marked *