Loading, please wait...

Standard Library

C programs consist of modules or pieces called functions. You can program all the functions you need to form a C program, but most C programmers take advantage of a rich collection of existing functions called the C Standard Library.


Thus, there are really two pieces to learning how to program in C. The first is learning the C language itself, and the second is learning how to use the functions in the C Standard Library. The Standard C Library is must reading for programmers who need a deep understanding of the library functions, how to implement them and how to use them to write portable code. We use and explain many C library functions throughout this text.

 

When programming in C you’ll typically use the following building blocks:

• C Standard Library functions
• Functions you create yourself
• Functions other people have created and made available to you

 

The advantage of creating your own functions is that you’ll know exactly how they work. You’ll be able to examine the C code. On the contrary the disadvantage is the time-consuming effort that goes into designing, developing and debugging new functions.

 

Using Standard C library functions instead of writing your own comparable versions can improve program performance, because these functions are carefully written to perform efficiently.

 

It can also improve program portability, because these functions are used in virtually all Standard C implementations.