void EnterValues(float dataarray[][MAXDATACOL]); is a function prototype, which means that it is used to tell the compiler that there is a function declared somewhere (in this case, in the same C file) called EnterValues , which returns a float dataarray[][MAXDATACOL] as a parameter and returns nothing ( void ), the prototype of the function is not declared inside any function, but outside, and it needs to be declared before you can use this function. otherwise, the compiler will not know what you mean when you call this function.
When you call a function that happens inside some other function (in this case you want to call EnterValues from main ), you will not specify what type it receives / returns. You simply obey the function declaration (prototype) by providing it with input parameters of the correct type and assigning it the return value of a variable of the corresponding type.
For instance:
int multiply(int arg1, int arg2); int main() { int a = 4; int b = 3; int sum; sum = multiply(a, b); return 0; } int multiply(int arg1, int arg2) { return arg1 * arg2; }
As I see a lot of errors in your code, I suggest you read the book C programming language , which is not entirely new, but very bright. (see this question )
source share