Programming Languages C Objective
Mar 08, 2013

What will be the output of the following program ?

#include<stdio.h>
void main()
{
int a = 36, b = 9;
printf("%d",a>>a/b-2);
}

Choose the correct answer:
A) 7
B) 9
C) 2
D) 5
Detailed Explanation

In C the operator procedure is "/", "-"and then" >>".
Hence,
36>>36/9-2
36>>4-2
36>>2
9.

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback