1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

plz tell me the output of this program??

Discussion in 'Programming' started by gubba, Nov 8, 2011.

  1. gubba

    gubba New Member

    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...
     
    Last edited by a moderator: Nov 8, 2011

Share This Page