Difference between exit return (2) and exitreturn

Source: Internet
Author: User

Difference between exit return (2) and exitreturn
1. return returns the function value, which is a keyword; exit is a function.
2. return indicates the language level, which indicates the return of the call stack, and exit indicates the system call level, which indicates the end of a process.
3. return indicates the exit of the function (return); exit indicates the exit of the process.
4. return is provided in C language, and exit is provided by the operating system (or provided in the function library ). Exit is a library function. exit (1) indicates to exit the program after an error occurs, and exit (0) indicates to exit normally.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.