Function Prototype (declaration)


In C, functions first have to be declared before they are used.

#include <stdio.h>

int myFunctionPrototype(int x, char chr, float num);

int main(){
	int OperationResult;
	OperationResult = myFunctionPrototype(32, 'C', 34.2);
	return 0;
}

int myFunctionPrototype(int x, char chr, float num){
 // do some stuff
 return result;
}

A prototype let's the compiler know about: