Teaching const

Frank Adams franka at mmintl.UUCP
Tue Apr 19 08:04:48 AEST 1988


In article <9719 at ism780c.UUCP> marv at ism780.UUCP (Marvin Rubenstein) writes:
>In article <786 at srs.UUCP> srs!craig at cs.rochester.edu (Craig Schmackpfeffer) writes:
>>The "int a[1]" declaration ALLOCATES space for an 
>>int and "a" itself is not a pointer.
>But "a" itself a pointer or else *a would not be allowed.

No, "a" itself is an array.  In the context of the "*" operator (and *most*
other contexts) it is *implicitly* converted to a pointer.  The same way in:

int x; long y;
return x+y;

x is implicitly converted to a long.
-- 

Frank Adams                           ihnp4!philabs!pwa-b!mmintl!franka
Ashton-Tate          52 Oakland Ave North         E. Hartford, CT 06108



More information about the Comp.lang.c mailing list