main()
{
int a=4,b=2;
a=b<<a + b>>2;
printf("%d", a);
}
Answer Posted / satya
yes , the output will be 32....
<< and >> are bitwise operators... not relational ops..
reason:
<< means left shift operator..
>> means right shift operator..
for example.. if we give 2>>1
binary number for 2 is 0000 0010
the operator is right shift..so 0000 0001
for example.. if we give 2<<1
binary number for 2 is 0000 0010
the operator is left shift..so 0000 0100
go through this u will get the output...
| Is This Answer Correct ? | 79 Yes | 10 No |
Post New Answer View All Answers
Given an array of 1s and 0s arrange the 1s together and 0s together in a single scan of the array. Optimize the boundary conditions?
Explain union.
Can stdout be forced to print somewhere other than the screen?
Write a program to print factorial of given number without using recursion?
explain what is fifo?
Explain how can I open a file so that other programs can update it at the same time?
Do you know the difference between exit() and _exit() function in c?
Explain zero based addressing.
What is the newline escape sequence?
What is a stream in c programming?
What are structural members?
how to count no of words,characters,lines in a paragraph.
Explain the priority queues?
How do you print only part of a string?
Explain the array representation of a binary tree in C.