Mail Archives: djgpp/1997/11/25/05:17:37
Message-Id: | <3.0.5.32.19971125111658.009b0870@dictator.nt.tuwien.ac.at>
|
Date: | Tue, 25 Nov 1997 11:16:58 +0100
|
To: | djgpp AT delorie DOT com
|
From: | Anton Helm <tony AT nt DOT tuwien DOT ac DOT at>
|
Subject: | Re: pointers &arrays[]
|
In-Reply-To: | <3.0.16.19971125104154.290fe38a@hem1.passagen.se>
|
Mime-Version: | 1.0
|
At 10:42 25.11.97 -0500, you wrote:
>At 19.33 1997-11-24 -0500, you wrote:
>I think that sizeof(array), would just return the size of a pointer, since
>that is what it is, and not the size of the actual array.
This is wrong.
ANSI C standard (ISO/IEC 9899:1990 p.45):
[...]
Another use of the sizeof operator is to compute the number of elements in an array:
sizeof array / sizeof array[0]
[...]
- Raw text -