Log In Register

Units


Arithmetic Operators - Questions and Answers

 

Practice these Arithmetic Operators under C Programming walk-in interview Questions/ examination questions with best tricks and short cuts with solution. Student (candidate) who want to crack the walk in interview, competitive exams and want to find short cuts and tricks to solve questions on Arithmetic Operators for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Arithmetic Operators of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Arithmetic Operators.
– Anyone who is preparing for interviews (competitive examinations, govt examinations and bank examinations, off-campus or on campus interviews, walk-in interview and company interviews) having questions on Arithmetic Operators under C Programming.

– Anyone who is preparing for aptitude test or competitive exam or entrance exam.
– Anyone who is preparing for entrance examinations and other competitive examinations.
– All Experienced, Freshers and Students.

Here is list of Questions and Answers covering all key area of  Arithmetic Operators topic of C Programming:

 

1.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = -3;
  5.         int k = i % 2;
  6.         printf("%d\n", k);
  7.     }

Answer: Option C

Explanation:

2.

What is the output of this C code?

  1.     #include <stdio.h>
  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.     }

Answer: Option D

Explanation:

3.

Which among the following are the fundamental arithmetic operators, ie, performing the desired operation can be done using that operator only?

Answer: Option D

Explanation:

4.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int x = 5.3 % 2;
  5.         printf("Value of x is %d", x);
  6.     }

Answer: Option A

Explanation:

5.

What is the value of x in this C code?

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int x = 5 * 9 / 3 + 9;
  5.     }

Answer: Option B

Explanation:

6.

What is the output of this C code?

  1.     #include <stdio.h>
  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.     }

Answer: Option C

Explanation:

7.

Which of the following data type will throw an error on modulus operation(%)?

Answer: Option A

Explanation:

8.

What is the output of this C code?

  1.    #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = -5;
  5.         i = i / 3;
  6.         printf("%d\n", i);
  7.         return 0;
  8.     }

Answer: Option D

Explanation:

9.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         int y = 3;
  5.         int x = 5 % 2 * 3 / 2;
  6.         printf("Value of x is %d", x);
  7.     }

Answer: Option D

Explanation:

10.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 5;
  5.         i = i / 3;
  6.         printf("%d\n", i);
  7.         return 0;
  8.     }

Answer: Option C

Explanation:

11.

Which of the following is not an arithmetic operation?

Answer: Option B

Explanation:

12.

What is the output of this C code?

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

Answer: Option A

Explanation:

13.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int i = 3;
  5.         int l = i / -2;
  6.         int k = i % -2;
  7.         printf("%d %d\n", l, k);
  8.         return 0;
  9.     }

Answer: Option C

Explanation:

14.

The precedence of arithmetic operators is (from highest to lowest)

Answer: Option D

Explanation: