CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS LANGUAGES C DETAILS
Question :
Is using exit() the same as using return?



Category C Interview Questions
Rating (4.0) By 1 users
Added on 7/19/2006
Views 2431
Rate it!
Answers:

No. The exit() function is used to exit your program and return control to the operating system. The return
statement is used to return from a function and return control to the calling function. If you issue a return
from the main() function, you are essentially returning control to the calling function, which is the operating
system. In this case, the return statement and exit() function are similar.



it is not possible to use the "cxit()" is same as "return".there is lot of difference between those 2.
"exit()"is used to exit from the program.
where as return is used to return the value to the "calling function".



 Posted by: sreelatha    

Contact sreelatha  Contact sreelatha

exit() is used to terminate the program and exit from the program where it called.
but return() fun will returns to calling function



 Posted by: nareshkumar    

Contact nareshkumar  Contact nareshkumar

exit() to exit abnormally.
return to come out normally.



 Posted by: sheik abdul rahman .S    

Contact sheik abdul rahman .S  Contact sheik abdul rahman .S


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Is it possible to execute code even after the program exits the main() function?


View Answer
What is a static function?


View Answer
How do you print an address?


View Answer
What is the difference between NULL and NUL?


View Answer
What is the stack?


View Answer
What is a null pointer?


View Answer
How can I convert a number to a string?


View Answer
What is the difference between #include <file> and #include ?file??


View Answer
What is Preprocessor?


View Answer
What is the difference between text and binary modes?


View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL C Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/6070/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

1.41