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
How can I remove the leading spaces from a string?
What are pointers? What are stacks and queues?
What is uint8 in c?
What is a example of a variable?
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Write a program to check prime number in c programming?
What is a pointer on a pointer in c programming language?
What is a null pointer assignment error? What are bus errors, memory faults, and core dumps?
In which header file is the null macro defined?
If null and 0 are equivalent as null pointer constants, which should I use?
what is a NULL Pointer? Whether it is same as an uninitialized pointer?
What are identifiers in c?
Write a code to determine the total number of stops an elevator would take to serve N number of people.
main() { inta=10,b=20; a>=5?b=100:b=200; printf("%d ",b); }
Write program to remove duplicate in an array?