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
Explain setjmp()?
What is variable declaration and definition in c?
Explain the use of #pragma exit?
What is use of integral promotions in c?
Ow can I insert or delete a line (or record) in the middle of a file?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
A character flag or control mechanism that delineates one data item from another a) variable b) constant c) delimiter d) call by reference
How to delete a node from linked list w/o using collectons?
Explain what is the purpose of "extern" keyword in a function declaration?
How can you increase the allowable number of simultaneously open files?
explain how do you use macro?
What is the difference between int main and void main?
How many levels of indirection in pointers can you have in a single declaration?
typedef struct{ char *; nodeptr next; } * nodeptr ; What does nodeptr stand for?
What is the difference between call by value and call by reference in c?