Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site inuxh.UUCP
Path: utzoo!watmath!clyde!floyd!harpo!ihnp4!inuxc!inuxh!stevens
From: stevens@inuxh.UUCP (W Stevens)
Newsgroups: net.lang.c
Subject: Re: sizeof "string"
Message-ID: <268@inuxh.UUCP>
Date: Tue, 31-Jan-84 08:39:12 EST
Article-I.D.: inuxh.268
Posted: Tue Jan 31 08:39:12 1984
Date-Received: Mon, 6-Feb-84 16:27:29 EST
References: <1623@rlgvax.UUCP> <810@hao.UUCP>
Organization: AT&T Consumer Products Div., Indianapolis
Lines: 21

On our system (Vax 11/780 running UNIX 5.0, a.k.a. System V), the
program:

main()
{
	printf("size of \"Hello world!\" is %d\n",
	 sizeof("Hello world!"));
	exit(0);
}

prints the value 13.  This agrees with K&R page 181: "A string has type
'array of characters' and storage class static ... and is initialized
with the given characters."

--
Scott Stevens
AT&T Consumer Products Laboratories
Indianapolis, Indiana, USA
UUCP: inuxh!stevens

The difficult didn't get done yesterday, so the impossible will have to wait.