Evaluation of function arguments (w/ side-effects)
LINNDR%VUENGVAX.BITNET at wiscvm.ARPA
LINNDR%VUENGVAX.BITNET at wiscvm.ARPA
Mon Sep 22 16:11:22 AEST 1986
Does anyone know of a compiler for which the program below does NOT
produce the output shown?
----------------------------------
/* order - program to demonstrate order of function argument evaluation */
/* David Linn - Vanderbilt University - 1986 */
main()
{
int i;
i = 0;
auxfun(i++,i++,i++);
printf("%d\n",i);
}
auxfun(a,b,c)
{
printf("%d,%d,%d\n",a,b,c);
}
----- PROGRAM OUTPUT ---------------
2,1,0
3
------------------------------------
David Linn
LINNDR%VUENGVAX.BITNET at WISCVM.WISC.EDU ! Internet (I think)
...!psuvax1!vuengvax.bitnet!linndr ! Usenet
More information about the Comp.lang.c
mailing list