7.5.7 General utility functions
General utility functions are as follows.
Table 7.9 | General Utility Functions |
|
|
atof
|
Conversion of character string to floating-point number (double type)
|
atoff
|
Conversion of character string to floating-point number (float type)
|
atoi
|
Conversion of character string to integer (int type)
|
atol
|
Conversion of character string to integer (long int type)
|
strtod
|
Conversion of character string to floating-point number (double type) (storing pointer in last character string
|
strtof
|
Conversion of character string to floating-point number (float type) (storing pointer in last character string
|
strtol
|
Conversion of character string to integer (long int type) and storing pointer in last character string
|
strtoul
|
Conversion of character string to integer (unsigned long int type) and storing pointer in last character string
|
rand
|
Pseudorandom number sequence generation
|
srand
|
Setting of type of pseudorandom number sequence
|
calloc [V1.02 or later]
|
Allocates dynamic memory that is initialized by 0.
|
free [V1.02 or later]
|
Releases dynamic memory
|
malloc [V1.02 or later]
|
Allocates dynamic memory
|
realloc [V1.02 or later]
|
Re-allocates dynamic memory
|
abort
|
Terminates the program
|
bsearch
|
Binary search
|
qsort
|
Sort
|
abs
|
Output absolute value (int type)
|
div
|
Division (int type)
|
labs
|
Output absolute value (long type)
|
ldiv
|
Division (long type)
|