Sams Teach Yourself C in 21 Days

(singke) #1

DAY 19


WEEK 3


Exploring the C Function


Library


As you’ve seen throughout this book, much of C’s power comes from the func-
tions in the C standard library. In today’s lessons, you’ll explore some of the
functions that don’t fit into the subject matter of other days. Today you will
learn about


  • Mathematical functions

  • Functions that deal with time

  • Error-handling functions

  • Functions for searching and sorting data


Mathematical Functions ......................................................................................


The C standard library contains a variety of functions that perform mathemati-
cal operations. Prototypes for the mathematical functions are in the header file
math.h. The math functions all return a type double. For the trigonometric
functions, angles are expressed in radians rather than degrees, which you may

30 448201x-CH19 8/13/02 11:20 AM Page 533

Free download pdf