What is the output of following program ?
int
main()
{
int x = 5;
printf("%d %d %d\n", x, x << 2, x >> 2);
}
Answer Posted / krishna deep sharma
4,4,1
coz we shift the bit as 5=101 now shift two bit to right as
101>>2=001
now
2<<001=100
noe x=4
printf execute from right to left so ans is 4,4,1
| Is This Answer Correct ? | 11 Yes | 28 No |
Post New Answer View All Answers
What is array of structure in c programming?
What is hungarian notation? Is it worthwhile?
What is nested structure with example?
What are the different file extensions involved when programming in C?
How do you print an address?
List out few of the applications that make use of Multilinked Structures?
Why is c called c not d or e?
What is the use of sizeof?
Lists the benefits of c programming language?
Where we use clrscr in c?
Can a pointer be null?
diff between exptected result and requirement?
Wt are the Buses in C Language
What would be an example of a structure analogous to structure c?
Explain what is the concatenation operator?