sizeof "string"

chris at umcp-cs.UUCP chris at umcp-cs.UUCP
Wed Feb 8 10:46:29 AEST 1984


Ok, so "\9\8\7" is a bit weird.  (It just happens to work though.)
But in fact you might want to put a \0 in a real string.  How about
a new example:

char translate[] = "these\0those\0this\0that\0";

The two "\0"s in a row are an end marker.  Someone might then write
something to translate words ("these" => "those", "this" => "that").
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris.umcp-cs at CSNet-Relay



More information about the Comp.lang.c mailing list