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 malloc calloc and realloc in c?
Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.
What is a program?
Can you please explain the difference between syntax vs logical error?
What is the -> in c?
How do you declare a variable that will hold string values?
What is anagram in c?
Explain why can’t constant values be used to define an array’s initial size?
Why c is faster than c++?
Why is c called "mother" language?
What is an lvalue?
a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none
Why does everyone say not to use gets?
Can a variable be both constant and volatile?
How can you find out how much memory is available?