Thursday, February 14, 2008

Aptitude Question No.16

Aptitude Question No.16

main()
{

printf("%x",-1<<4);
}
Answer
fff0
Explanation :
-1 is internally represented as all 1's. When left shifted four times the least significant 4 bits are filled with 0's.The %x format specifier specifies that the integer value be printed as a hexadecimal value.

No comments:

2008 Placement papers of Top MNC companies

eXTReMe Tracker