You are here:

C/Return statement / Exit().

Advertisement


Question
what is the purpose of a return statement/exit() function?

Answer
Hai dear Elme,



 The exit() function stops the program. exit_code is passed on to be the return value of the program, where usually zero indicates success and non-zero indicates an error.

I have already answered similar question .. from you statement I can understand that the usage of exit() / return statement specially on main() function .. please follow the reference link given below .. let me know if you wish to have more information regarding that ..


 http://en.allexperts.com/q/C-1587/2009/8/Return-type-main.htm


Thanks and Regards
Prince M. Premnath  

C

All Answers


Answers by Expert:


Ask Experts

Volunteer


Prince M. Premnath

Expertise


I'm sure that I can solve any doubts in Turbo C ,Graphics Programing ,Mouse, Hardware Programming ,File System ,Interrupts, BIOS handling , TSR Programming , General Concepts in C Language, handling inline Assembly statements

Experience

Research over 6+ Years

Organizations
CG-VAK Softwares and Exports Limited

Education/Credentials
Masters in Computer Applications

©2012 About.com, a part of The New York Times Company. All rights reserved.