1.

Distinguish between exit(0) function and return statement

Answer»

Both are used to terminate the program but both are different. Return is a keyword and exit(0) is a function. The difference is, we can use more than one exit(0) function but we can use only one return statement in a scope. To use exit(0), the header file cstdlib should be used.



Discussion

No Comment Found

Related InterviewSolutions