Go4Expert

Go4Expert (http://www.go4expert.com/)
-   Programming (http://www.go4expert.com/forums/programming-forum/)
-   -   plz tell me the output of this program?? (http://www.go4expert.com/forums/plz-tell-output-program-t27111/)

gubba 8Nov2011 16:07

plz tell me the output of this program??
 
Hello frnz..
I'm a newbie here but not to programming.
I've got a small doubt with this porgram..
Code:

main()
{
int *ptr=(int*)malloc(sizeof(int));
*ptr=4;
printf("%d",(*ptr)+++*ptr++);
}

In this the output it shows is : 16

But due to operator sideeffect it should be 36..
am i right??
plz correct me if I'm wrong.


waiting for ur replies...


All times are GMT +5.5. The time now is 07:48.