Thats not homework.. I asked these questions because i have no clue as to what the answer is. If i knew so, i wouldnt be asking.
Originally Posted by grumpy
But then, to elaborate on them more..
1. Can a pointer be typecasted ? Why or why not ?
2. I've heard that pointer can hold the address of a function. What does that mean ? Where is a function stored ?
Absolutely no clue about this.
3. What does #define f(g,g2) g##g2 mean ?
According to my knowledge, when a function is called, the function details are stored in an activation frame which is pushed into the system stack.
I've never heard of function arguments being pushed into anything. So, what exactly is goin on here ?
What does ## between g and g2 means ??
Why ? Shouldnt this yield 5 + 6 = 11 ?
Output of this program ?
int i= 5;
printf("%d",i++ + ++i)
Answer : cannot be predicted.
According to the answer to the above question, the function arguments are pushed from last to first and evaluated while being pushed. Please elaborate on this.
Output of this ?
printf("%d %d %d %d %d",i++,i--,++i,--i,i);