Categories:
.NET (357)
C (330)
C++ (184)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (2)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
Shift Operators
What will be printed as the result of the operation below:
main() {
int x=5;
printf("%d,%d,%d\n",x,x<<2,x>>2);
}
✍: FYIcenter
As x = 5 = 0x0000,0101; so x << 2 -< 0x0001,0100 = 20; x >> 2 -> 0x0000,0001 = 1. Therefore, the answer is 5, 20, 1.
2007-02-26, 7883👍, 0💬
Popular Posts:
How To Recover a Dropped Index? - Oracle DBA FAQ - Managing Oracle Table Indexes If you have the rec...
What is the quickest sorting method to use? The answer depends on what you mean by quickest. For mos...
If cookies are not enabled at browser end does form Authentication work? No, it does not work.
What is Traceability Matrix? Traceability Matrix is one of the document will prepare by QA.To make s...
How to reduce the final size of an executable file? Size of the final execuatable can be reduced usi...