Function call doubt

why we need to write function definition outside main

Hello @viknesh1375 this is what called prototype this you have to do when you declare you main first and function below the main.But if you write the function first and then main there will be no need for that.

sorry i didnt get it could explain me once again

@viknesh1375 please share the code in which the function definition is written outside main.
i will explain you accordingly then

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.