Certainly! Here's an example of a function definition outside the main function:
#include <stdio.h>
// Function declaration
void greetUser();
int main() {
greetUser(); // Function call
return 0;
}
// Function definition
void greetUser() {
printf("Hello, User!\n");
}
In this example, the function greetUser() is defined outside the main() function and is called from within main().