Campus interview zone
Would you like to react to this message? Create an account in a few clicks or log in to continue.

What is the output of following-5

Go down

What is the output of following-5 Empty What is the output of following-5

Post  Admin Sun Jan 31, 2010 7:48 am

13.#define int char
main()
{
int i=65;
printf("sizeof(i)=%d",sizeof(i));
}
Answer:
sizeof(i)=1
Explanation:
Since the #define replaces the string int by the macro char


14. main()
{
int i=10;
i=!i>14;
printf("i=%d",i);
}
Answer:
i=0
Explanation:
In the expression !i>14 , NOT (!) operator has more precedence than ‘ >’ symbol. ! is a unary logical operator. !i (!10) is 0 (not of true is false). 0>14 is false (zero).

Admin
Admin

Posts : 71
Join date : 2010-01-21

http://campus-interview.co.cc

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum