main()
{
int i = 258;
int *iPtr = &i;
printf("%d %d", *((char*)iPtr), *((char*)iPtr+1) );
}
Answer / susie
Answer :
2 1
Explanation:
The integer value 257 can be represented in binary as,
00000001 00000001. Remember that the INTEL machines are
‘small-endian’ machines. Small-endian means that the lower
order bytes are stored in the higher memory addresses and
the higher order bytes are stored in lower addresses. The
integer value 258 is stored in memory as: 00000001 00000010.
| Is This Answer Correct ? | 9 Yes | 0 No |
Is there any difference between the two declarations, 1. int foo(int *arr[]) and 2. int foo(int *arr[2])
How do you verify if the two sentences/phrases input is an anagram using predefined functions in string.h and by using arrays?
Is it possible to type a name in command line without ant quotes?
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
9 Answers CSC, GoDB Tech, IBM,
Sir... please give some important coding questions asked by product companies..
Is the following code legal? void main() { typedef struct a aType; aType someVariable; struct a { int x; aType *b; }; }
void main() { int i=i++,j=j++,k=k++; printf(“%d%d%d”,i,j,k); }
main() { main(); }
Write a program to receive an integer and find its octal equivalent?
Give a very good method to count the number of ones in a 32 bit number. (caution: looping through testing each bit is not a solution)
void main() { char ch; for(ch=0;ch<=127;ch++) printf(“%c %d \n“, ch, ch); }
what is the output of following program ? void main() { int i=5; printf("%d %d %d %d %d ",i++,i--,++i,--i,i); }