How To Exit Program In Dev C++

How to exit program in dev c download

  • The C Standard Library

One way to get input into a program or to display output from a program is to use standard input and standard output, respectively.All that means is that to read in data, we use cin (or a few other functions) and to write out data, we use cout. When we need to take input from a file (instead of having the user type data at the keyboard) we can use input redirection.

  • C Standard Library Resources
Exit
  • C Programming Resources
  • Selected Reading

Description

The C library function void exit(int status) terminates the calling process immediately. Any open file descriptors belonging to the process are closed and any children of the process are inherited by process 1, init, and the process parent is sent a SIGCHLD signal.

Declaration

Following is the declaration for exit() function.

How To Exit Program In Dev C Free

Parameters

How To Exit Program In Dev C Example

  • status − This is the status value returned to the parent process.

Return Value

This function does not return any value.

Example

The following example shows the usage of exit() function.

Let us compile and run the above program that will produce the following result −

stdlib_h.htm