Is ``char c; strcpy(&c,"");'' ANSI C?

Mark Brader msb at sq.sq.com
Sun Aug 27 10:14:07 AEST 1989


> While K&R II is a good way to learn ANSI C, it cannot take the place of
> the actual standard.
> Section 3.3.6, page 48, lines 9-11:
> 	For the purposes of these operators [binary + and -], a pointer
> 	to a nonarray object behaves the same as a pointer to the first
> 	element of an array of length one with the type of the object
> 	as its element type.

Actually, this is one of the few places where it shows up that K&R II
is based on the January 1988 draft of the standard.  That sentence was
added to Section 3.3.6 later than that, as an editorial change (proposed
by me, by the way).

-- 
Mark Brader			"This process can check if this value
SoftQuad Inc., Toronto		 is zero, and if it is, it does something
utzoo!sq!msb, msb at sq.com	 child-like."		-- Forbes Burkowski

This article is in the public domain.



More information about the Comp.lang.c mailing list