0
Is this possible in c?
int fun(int a[22]);
3 Antworten
+ 1
yes it is.
but you should know that an array type is passed into a function as a pointer to the first element of the array, you can use array notation (int[]) or pointer notation (int*) in the function declaration, the compiler always treats it as pointer (int*). for example, the following declarations are equivalent:
int fun(int a[22]);
int fun(int *a);
int fun(int a[]);
they will be treated as int* by the compiler, as follow. the size of the array given in [] is ignored.
+ 2
And what is it supposed to do?
0
It is a prototype