What does main function returns in C and to whom it return?

every function returns to main function but to whom main function return and what value?

1 Like

It returns the value to the OS or whatever process launched it. If you launched your program from a batch file then the batch file can detect this return value. If your program is spawned or launched by another program then the return value goes to that parent program or process.

it returns int type value.