InterviewSolution
Saved Bookmarks
| 1. |
Consider the following C codeint main(){ int a = 300; char *b = (char *)&a; *++b = 2; printf("%d ",a); return 0;}Consider the size of int as two bytes and size of char as one byte. Predict the output of the following code .Assume that the machine is little-endian.(A) 556(B) 300(C) Runtime Error(D) Compile Time Error |
| Answer» | |