Jump to content

Stdlib.h

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by 1exec1 (talk | contribs) at 17:03, 21 October 2011 (template has been moved). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

C program control operations are a group of functions in the standard library of the C programming language implementing basic program control operations.[1]

Function overview

The program control functions are defined in the stdlib.h header (cstdlib header in C++).

Terminating a program
  • abort - C/C++ - causes abnormal program termination (without cleaning up)
  • exit - C/C++ - causes normal program termination with cleaning up
  • _Exit - C99/C++11 - causes normal program termination without cleaning up
  • atexit - C/C++ - registers a function to be called on exit() invocation
Communicating with the environment
  • getenv - C/C++ - accesses the list of the environment variables
  • system - C/C++ - calls the host environment's command processor

References

  1. ^ ISO/IEC 9899:1999 specification (PDF). p. 327, § 7.20.4.