Every language has libraries that support common tasks. For some languages, libraries are a huge part of the language. In this section, we will introduce you to a few of the more common libraries in the C language.
Learning Outcomes
- Use string.h library functions to manipulate C-strings including strcpy(), strcmp(), strlen(), and strcat() with proper understanding of null-terminated character arrays
- Use ctype.h library functions to test character properties (alphabetic, digit, whitespace, etc.) and convert characters between cases using toupper() and tolower()
- Apply math.h library functions to perform common mathematical operations including rounding, absolute value, roots, powers, logarithms, and trigonometric functions
- Convert strings to numeric types using stdlib.h conversion functions (atoi(), atol(), atof()) and understand the appropriate use cases for each
- Implement pseudo-random number generation using rand() and srand() with proper seeding strategy and understand the relationship between seeds and reproducibility