What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / krishna deep sharma
4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1
| Is This Answer Correct ? | 11 Yes | 28 No |
Post New Answer View All Answers
How can I get back to the interactive keyboard if stdin is redirected?
Tell me what is null pointer in c?
Why is extern used in c?
main() { printf("hello"); fork(); }
Are comments included during the compilation stage and placed in the EXE file as well?
What is a far pointer in c?
How many types of operators are there in c?
Is linux written in c?
Sir i need notes for structure,functions,pointers in c language can you help me please
Distinguish between actual and formal arguments.
What is the difference between functions getch() and getche()?
Is there any demerits of using pointer?
Write a code to generate divisors of an integer?
Explain zero based addressing.
What are the 32 keywords in c?