I am trying to learn C and was watching this youtube tutorial and had the following query:
At 1:40:24 the function is written below the main function block but the code does not throw an error:
#include <stdio.h>
#include <stdlib.h>
int main()
{
sayHi();
return 0;
}
void sayHi() {
printf("Hello User");
}
At 1:52:00 he runs another function he created below the main block but this time an error comes up, which he explicitly states is due to the function being written below the main block. Why does this error not come up in the first case?