Log In Register

Units


Precedence And Order Of Evaluation - Questions and Answers

 

Practice these Precedence And Order Of Evaluation 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 Precedence And Order Of Evaluation for following purpose.


– Anyone who is wishing to increase their perfect knowledge of Precedence And Order Of Evaluation of C Programming.
– Anyone who is preparing for aptitude test and increase his in depth aptitude knowledge C Programming specifically Precedence And Order Of Evaluation.
– 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 Precedence And Order Of Evaluation 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  Precedence And Order Of Evaluation topic of C Programming:

 

1.

What is the output of this C code?

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

Answer: Option C

Explanation:

2.

What is the output of this C code?

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

Answer: Option C

Explanation:

3.

What is the output of this C code?

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

Answer: Option C

Explanation:

4.

What is the output of this C code?

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

Answer: Option C

Explanation:

5.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void main(
  3.     {
  4.         double b = 8;
  5.         b++;
  6.         printf("%lf", b);
  7.     }

Answer: Option D

Explanation:

6.

What is the output of this C code?

  1.     #include <stdio.h>
  2.     void main()
  3.     {
  4.         char a = 'A';
  5.         char b = 'B';
  6.         int c = a + b % 3 - 3 * 2;
  7.         printf("%d\n", c);
  8.     }

Answer: Option A

Explanation:

7.

What is the output of this C code?

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

Answer: Option C

Explanation:

8.

What is the output of the code given below

  1.     #include <stdio.h>
  2.     int main()
  3.     {
  4.         int x = 0, y = 2;
  5.         if (!x && y)
  6.             printf("true\n");
  7.         else
  8.             printf("false\n");
  9.     }

Answer: Option D

Explanation:

9.

What is the output of this C code?

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

Answer: Option B

Explanation:

10.

What is the output of this C code?

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

Answer: Option B

Explanation:

11.

What is the output of this C code?

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

Answer: Option C

Explanation:

12.

What is the output of this C code?

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

Answer: Option C

Explanation:

13.

What is the output of this C code?

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

Answer: Option A

Explanation:

14.

What is the output of this C code?

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

Answer: Option C

Explanation:

15.

What is the output of this C code?

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

Answer: Option D

Explanation: