Re: "array"

Liste des GroupesRevenir à l c 
Sujet : Re: "array"
De : Ros (at) *nospam* invalid.invalid (Rosario19)
Groupes : comp.lang.c
Date : 02. Apr 2025, 18:53:15
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <72uqujlo006r4ggh10rt94j158fpbqlm1e@4ax.com>
References : 1
User-Agent : Forte Free Agent 1.93/32.576 English (American)
On 2 Apr 2025 11:01:01 GMT, (Stefan Ram) wrote:

 Below, an array is allocated dynamically.
>
#include <stdio.h>
#include <stdlib.h>
>
int main( void )
{ char *array_pointer = malloc( 10 * sizeof *array_pointer );
 if( !array_pointer )return EXIT_FAILURE;
 *array_pointer = 'a';
 free( array_pointer ); }
>
 But is it really an array according to the C spec?
>
 C only defines "array type", not array, but it uses ISO/IEC 2382:2015
 as a normative reference, and ISO/IEC 2382:2015 says:

Im not one expert...

i consider one array one contiguos succession of elements, where
elements have the sama type

and array has no type

or has the type "array of lements type T"


Date Sujet#  Auteur
2 Apr 25 * "array"9Stefan Ram
2 Apr 25 +* Re: "array"2Stefan Ram
2 Apr 25 i`- Re: "array"1Muttley
2 Apr 25 +- Re: "array"1Rosario19
3 Apr 25 +- Re: "array"1Tim Rentsch
3 Apr 25 `* Re: "array"4Keith Thompson
3 Apr 25  +* Re: "array"2Chris M. Thomasson
3 Apr 25  i`- Re: "array"1Keith Thompson
3 Apr 25  `- Re: "array"1Tim Rentsch

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal