Solution for Exercise 11-5

ex1105

#include <stdio.h>

int main()
{
    int a,b;

    b=16;
    printf("Before, a is unassigned and b=%d\n",b);
    a=b++;
    printf("After, a=%d and b=%d\n",a,b);
    return(0);
}

Output

Before, a is unassigned and b=16
After, a=16 and b=17

Notes

* The value of b is assigned to a first, then the value of b is incremented.