D.3 The stdlib.h Module
#include <ctype.h>
The standard general utilities library that defines general purpose functions for dynamic memory management, random number generation, searching, sorting, and string conversions.
Functions
String Conversion Functions
|
double atof(const char* str);
|
|
int atoi(const char* str);
|
|
long atol(const char* str);
|
Dynamic Memory Functions
|
void * malloc(int size);
|
|
void * calloc(int num, int size);
|
|
void free(void *ptr);
|
Searching and Sorting Functions
Integer Math Functions
|
int abs(int x);
|
Detailed Description
double atof(const char* str);
- Parameters:
- str
- The string to be converted to a floating-point value.
int atoi(const char* str);
- Parameters:
- str
- The string to be converted to an integer value.
long atol(const char* str);
- Parameters:
- str
- The string to be converted to a long integer value.
int rand(void);
void srand(unsigned int seed);
- Parameters:
- seed
void * malloc(int size);
- Parameters:
- size
void * calloc(int num, int size);
- Parameters:
- num
- size
void free(void *ptr);
- Parameters:
- ptr
void exit(int status);
- Parameters:
- status
void abort(void);
int abs(int x);
- Parameters:
- x