printf( "%3o\t%2x\t%3d\t%c\n", c = getchar(), c, c, c );
The order in which arguments passed to a function call are evaluated is unspecified. There is no guarantee that the result of
getchar() will be assigned to
c before the last three
c arguments are read.
c = getchar() outside of the function call fixes the issue.