It will generate syntax error because , in the main() function when we call fun(a) , it doesn't recognize what it is because our program is read from top to bottom. It will generate definition missing error because it doesn't know about fun(a).
To avoid this we can put the definition of the function before main() as
void fun(int a); .