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


Please Help Members By Posting Answers For Below Questions

What does *p++ do? What does it point to?

612


What is the meaning of typedef struct in c?

591


What is uint8 in c?

636


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

703


What is wrong with this statement? Myname = 'robin';

814






What are the application of void data type in c?

695


How to delete a node from linked list w/o using collectons?

2085


Explain b+ tree?

618


How can a string be converted to a number?

512


How can I trap or ignore keyboard interrupts like control-c?

616


What is the best way to comment out a section of code that contains comments?

776


Write a C program in Fibonacci series.

629


If the size of int data type is two bytes, what is the range of signed int data type?

583


What are the disadvantages of a shell structure?

686


What is volatile variable in c?

654