main()
{
int a=4,b=2;
a=b<<a + b>>2;
printf("%d", a);
}
Answer Posted / neha saxena
a=b<<a+b>>2
=2<<4+2>>2
According to precedence Table
1) + operated very 1st, (4+2=6)
2) then<< (left shift), (2<<6, 2 shifted left side 6 times
= 128)
3) and at last >> (right shift), (128>>2, 128 shifted right
side 2 times = 32)
Explanation in Answer No. 5, 6 & 7 are wrong
Is This Answer Correct ? | 171 Yes | 6 No |
Post New Answer View All Answers
What does *p++ do? What does it point to?
What is the meaning of typedef struct in c?
What is uint8 in c?
An organised method of depicting the use of an area of computer memory used to signify the uses for different parts of the memory a) swap b) extended memory c) memory map d) all of the above
What is wrong with this statement? Myname = 'robin';
What are the application of void data type in c?
How to delete a node from linked list w/o using collectons?
Explain b+ tree?
How can a string be converted to a number?
How can I trap or ignore keyboard interrupts like control-c?
What is the best way to comment out a section of code that contains comments?
Write a C program in Fibonacci series.
If the size of int data type is two bytes, what is the range of signed int data type?
What are the disadvantages of a shell structure?
What is volatile variable in c?