C examples for Function:Function Definition
Functions are code blocks.
You need to call it to execute it.
Functions can be used to divide programs into smaller parts.
Here is a function definition.
void myFunction(void) { printf("Hello World"); }
To invoke it, the function's name is specified followed by an empty set of parentheses.
#include <stdio.h> void myFunction(void) { printf("Hello World"); } int main(void) { myFunction(); /* "Hello World" */ }