A C puzzle

Sam Kendall kendall at wjh12.UUCP
Tue Dec 13 12:35:22 AEST 1983


My coworkers and I had fun with this one, devised by yours truly.  It is
not a program, but a question:

	For what, if any, subexpressions `p' do the expressions
		*(p)
	and
		(p)[0]
	not have identical meaning?

This is not a trick question, and in particular is not a syntactic trick
question.  The obvious parses are the correct ones.

There's no point in posting the answer immediately.  Someone should
eventually, I suppose.

	Sam Kendall		  {allegra,ihnp4}!wjh12!kendall
	Delft Consulting Corp.	    decvax!genrad!wjh12!kendall



More information about the Comp.lang.c mailing list