An algorithm is a step-by-step procedure to solve a problem. It works by processing data and producing output.
#include <stdio.h>
void hello() {
printf("Hello World");
}
The above code demonstrates a simple function in C.