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 ? | 173 Yes | 7 No |
Post New Answer View All Answers
What are the types of operators in c?
What is the purpose of 'register' keyword?
What is difference between structure and union in c?
What is the right way to use errno?
What is break statement?
What are the __date__ and __time__ preprocessor commands?
The number of bytes of storage occupied by short, int and long are a) 2, 2 and 4 b) 2, 4 and 4 c) 4, 4 and 4 d) none
if the area was hit by a virus and so the decrease in the population because of death was x/3 and the migration from other places increased a population by 2x then annually it had so many ppl. find our the population in the starting.
How do you determine the length of a string value that was stored in a variable?
Can we declare a function inside a function in c?
On most computers additional memory that is accessed through an adapter of feature card along with a device driver program. a) user memory b) conventional memory c) expandedmemory d) area
How do you print only part of a string?
#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }
What is the use of in c?
Explain union. What are its advantages?