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.

qsort()

As is evident ...

Get C Programming Essentials now with O’Reilly online learning.

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