Member • Sep 27, 2006
Mayank's C Challenger - I
Here is a small 'C' question for all of you. Find the output:
#include
int main()
{
int i=10;
int j=sizeof(++i);
printf("i = %d\n",i);
printf("j = %d\n",j);
return 0;
}
Actually finding the output is the easiest thing, just run it on any compiler. But, the point is to find out the discripency with the printed value of variable 'i'.
If i=10 then WHY????
If i=11 then WHY????
I will be comming up with other C/C++ questions too, so everyone keep answering and keep enjoying.
Thanks and Regards,
Mayank Shukla.