Quiz for Novice to Intermediate C Users

k.laux rkl at ahuta.UUCP
Tue Apr 23 07:03:38 AEST 1985


REFERENCES:  <717 at mako.UUCP>

	I believe you'll find that

	1)	int a, b, *p = &a;

	and

	2)	int a, b, *p;
		p = &a;

	ARE equivalent.  I took the code exactly as offered from the
net and cc'd it with no problems.  You will find that in either case
the compiler generates code to load the address of 'a' and store it
in 'p'.  1) is more compact, 2) is more explicit.

				R. Kevin Laux
				Software Vendor Tech Support
				ATTIS Lincroft
				ahuta!rkl (soon to be mtuxo!rkl)
				201-576-3610



More information about the Comp.lang.c mailing list