Teaching const
News system
news at ism780c.UUCP
Sat Apr 9 10:15:15 AEST 1988
In article <27071 at amdahl.uts.amdahl.com> nw at amdahl.uts.amdahl.com (Neal Weidenhofer) writes:
> int * const a;
>decodes as:
> a is a constant,
> a is a constant pointer,
> a is a constant pointer to an int.
> (i.e., a cannot be modified but *a can.)
Note that:
int a[1];
decodes as:
a is a constant,
a is a constant pointer,
a is a constant pointer to an int.
(i.e., a cannot be modified but *a can.)
But there must (?) be some difference between the two. How do you teach
this?
Marv Rubinstein.
More information about the Comp.lang.c
mailing list