argc[argv]

vmicro1 at ucbtopaz.CC.Berkeley.ARPA vmicro1 at ucbtopaz.CC.Berkeley.ARPA
Wed Dec 14 18:11:39 AEST 1983


One thing I enjoy doing to test the whimsy of C compilers is:

	char *x;
	char y;

	y = x[1];
	y = 1[x];

What sort of code (if any) do the two lines generate? Theoretically, they
are identical; at least one compliler (VAX-11C under VMS) complains (it
requires an lvalue in the second form); most let it slide.

----



More information about the Comp.unix mailing list