Categories:
.NET (961)
C (387)
C++ (185)
CSS (84)
DBA (8)
General (31)
HTML (48)
Java (641)
JavaScript (220)
JSP (109)
JUnit (31)
MySQL (297)
Networking (10)
Oracle (562)
Perl (48)
Perl (9)
PHP (259)
PL/SQL (140)
RSS (51)
Software QA (28)
SQL Server (5)
Struts (20)
Unix (2)
Windows (3)
XHTML (199)
XML (59)
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, 6650👍, 0💬
Popular Posts:
Regarding C Coding Given: Line in file Contents 30 int * someIDs, theFirst, *r; 110 someIDs =GetSome...
How can I implement a thread-safe JSP page? You can make your JSPs thread-safe by having them implem...
How To Control Table Widths? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells Usually, b...
How To Control Vertical Alignment? - XHTML 1.0 Tutorials - Understanding Tables and Table Cells By d...
What Is C Language? The C programming language is a standardized programming language developed in t...