main()
{
int x=5;
printf("%d %d %d\n",x,x<<2,x>>2);
}
Answer Posted / anand h i
in printf functiton evaluation of variables start from
right to left so first it evaluates
x>>2
101 after right shift of 2 it will be 001=1
next it will evaluate
x<<2
1 after left shift of 2 it will be 100=4
at the last x=4
so answer is 4 4 1
| Is This Answer Correct ? | 3 Yes | 13 No |
Post New Answer View All Answers
What is the use of clrscr?
develop algorithms to add polynomials (i) in one variable
Explain what is a 'locale'?
How can I get back to the interactive keyboard if stdin is redirected?
Explain what are reserved words?
Why void is used in c?
What is a constant and types of constants in c?
List out few of the applications that make use of Multilinked Structures?
What is external variable in c?
What is the purpose of 'register' keyword in c language?
What is enumerated data type in c?
Why functions are used in c?
What is the advantage of a random access file?
What is a protocol in c?
Array is an lvalue or not?