Is this ansi-c compliant?
hi
You can use pointer notation with an array in C: int X[]={1,2,3}; int Y=*X[1]; But can you also use array notation with pointer(is it ansi c compliant)? int i=3; int *X=&i; X[0]=10; //is this legal? thank you bye |
why dont you just compile with gcc and use -ansi and find out? :D
|
Is function:
int X(i) int i; { int j=16; } ansi c compliant?No,it ain't.But still,using 'cc -ansi X.c' doesn't give me any warnings about it,so I don't know why I should rely on -ansi switch to tell me whether something is ansi c or not |
this is is an old style if i remember correctly
|
YES that is compliant and YES you can rely on gcc to tell you.
|
and "No, it ain't" isn't "grammatically compliant".
|
All times are GMT -5. The time now is 06:09 AM. |