Functions
Function Headers
A function header names the return type, function name, and parameter list.
Function Headers
function_prototypes.c
#include <stdio.h>
int square(int value) {
return value * value;
}
int main(void) {
int value = ;
int result = square(value);
printf("square=%d\n", result);
return 0;
}
#include <stdio.h>
int square(int value) {
return value * value;
}
int main(void) {
int value = ;
int result = square(value);
printf("square=%d\n", result);
return 0;
}
#include <stdio.h>
int square(int value) {
return value * value;
}
int main(void) {
int value = ;
int result = square(value);
printf("square=%d\n", result);
return 0;
}
header
`int square(int value)` is the function header.
definition
The function definition combines the header with the body that runs.