0
Why not we use void as a main function rather than using int
As void function don't return any value and if we take int we have to return sime value so why not we prefer void as a function https://code.sololearn.com/cPsLUtdaVmSY/?ref=app
2 Answers
0
Hi.
Try reading this https://www.gnu.org/software/libc/manual/html_node/Exit-Status.html
In fact you are telling the calling program that your part went fine or you experienced an error in your execution depending on the value you return in the int main()