Get the App
SLTechnology News&Howtos  ›  Development  › 

How to use exit function in C language

Shulou Source: shulou.com Published: 2022-06-03 08:59:29 09月18日 Update

This article mainly shows you "how to use exit function in c language". The content is simple and clear. I hope it can help you solve your doubts. Let me lead you to study and learn this article "how to use exit function in c language".

1. The parameters of the exit function are passed to some operating systems, and the status status identifies some running information of the application.

This information is related to the machine and operating system. Generally, 0 means normal exit, while non-0 means abnormal exit.

2. The exit function terminates the executing process, and after the exit function is executed, it will not continue to execute the subsequent code.

Example

# include # include int main (void) {puts ("About to exit..../n"); exit (EXIT_SUCCESS); puts ("This will never be executable Organization"); return 1;} / * output: About to exit.... * / above is all the content of the article "how to use exit function in c language". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!

Tags: Functions languages content articles operating systems information systems learning help code parameters examples applications easy to understand more machines organization identification being status Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Shulou Technology MariaDB vpn Linux