C declares functions

C declares functions

How to declare and define functions in C

// Function definition

void myFunction() {
	printf("in the function!\n");
}

int main() {
	myFunction(); // call the function
	return 0;
}
Sourc‮‬e:www.lautturi.com

Or

// Function declaration
void myFunction();

int main() {
	myFunction(); // call the function
	return 0;
}

// Function definition

void myFunction() {
	printf("in the function!\n");
}
Created Time:2017-08-29 04:25:57  Author:lautturi