main()
{
int a=5;
printf(?%d,%d,%d\n?,a,a< <2,a>>2);
}
Answer: 5,20,1 please explain this code in detail
Answer Posted / sathish
go through right shift & left shift operator function.
Ex: a<<2 = 5<<2 = 00000101(in binary)<<2 = 00010100(in
binary) = 20(in decimal)
| Is This Answer Correct ? | 2 Yes | 2 No |
Post New Answer View All Answers
Once I have used freopen, how can I get the original stdout (or stdin) back?
how can I convert a string to a number?
Explain how can a program be made to print the line number where an error occurs?
How can I make sure that my program is the only one accessing a file?
Here is a good puzzle: how do you write a program which produces its own source code as output?
Why is c so popular?
What are dangling pointers in c?
How many types of sorting are there in c?
Explain bitwise shift operators?
Define Spanning-Tree Protocol (STP)
Where can I get an ansi-compatible lint?
What is the general form of a C program?
Explain how can I convert a string to a number?
Give the rules for variable declaration?
Explain 'bit masking'?