In C program I have a function:
Return type of eg1 is void, so does it make sense/valid to do exit(1) inside it. If there is a faliure in eg1, then it will come back to main immediately or the whole progam stops? Also, exit(1) and return 1; are same thing?Code:void eg1() { if (i==1){ exit(1) } } main(){ eg1(); }