Basic and Advance C Question:
Download Questions PDF

Is exit(status) truly equivalent to returning the same status from main?

Answer:

Yes and no. The Standard says that a return from the initial call to main is equivalent to calling exit. However, a return from main cannot be expected to work if data local to main might be needed during cleanup; A few very old, nonconforming systems may once have had problems with one or the other form. (Finally, the two forms are obviously not equivalent in a recursive call to main.)

Download C Programming Interview Questions And Answers PDF

Previous QuestionNext Question
How can I read in an object file and jump to locations in it?How can I open files mentioned on the command line, and parse option flags?