Appendix C

Some Useful Functions from stdlib.h

The header file “stdlib.h”, which stands for “standard library”, is a mixture of many different types of functions that are useful for day-to-day programming purposes. Unfortunately, not many learners are aware of the wealth of functions that lie here. Broadly, the functions in “stdlib.h” could be classified into five groups:

  • Storage allocation
  • Algorithms
  • Integer functions
  • Text conversion
  • Interacting with the environment

This appendix is an effort to introduce this collection of very useful functions to a new C programmer. This is not an attempt to demonstrate all the functions or all the uses of a particular function; rather, it emphasizes on how to use it in our own programs.


As is evident ...

Get C Programming Essentials now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.