can we declare a function in a header file in following way?
extern int ap( char[][] );
can we use char[][] in function?
A function declaration tells the compiler about a function's name, return type, and parameters. A function definition provides the actual body of the function. The C standard library provides numerous built-in functions that your program can call.
A function consist of two parts: Declaration: the function's name, return type, and parameters (if any) Definition: the body of the function (code to be executed)
Actually, it is not required that a function be declared before use in C. If it encounters an attempt to call a function, the compiler will assume a variable argument list and that the function returns int.
The function declaration (function statement) defines a function with the specified parameters. You can also define functions using the Function constructor and a function expression.
No, you need to specify the last N-1 dimensions for an array.
extern int ap( char[][DIMENSION] );
For more information look here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With