Another silly question
Sho Kuwamoto
sho at pur-phy
Wed May 3 17:24:42 AEST 1989
In article <17812 at cup.portal.com> Tim_CDC_Roberts at cup.portal.com writes:
>If I mix two pointer types, as in
> char * c;
> long * ell;
> return c + ell;
>is this anarchy? Is it a syntax error? What is sizeof(*(c+ell))?
This should be a syntax error. Even
long *a, *b;
return(a+b)
is illegal. However,
long *a, *b;
return(a-b);
Is legit. If a and b are pointers to different types, it is probably
still a syntax error. On the other hand, I could be wrong. I got
mildly crisped last time I fielded a question...
-Sho
More information about the Comp.lang.c
mailing list