Sr.No. |
函数 &说明 |
1 |
double atof(const char *str)
将参数 str 指向的字符串转换为浮点数(double 类型)。
|
2 |
int atoi(const char *str)
将参数 str 指向的字符串转换为整数(int 类型)。
|
3 |
long int atol(const char *str)
将参数 str 指向的字符串转换为长整型(long int 类型)。
|
4 |
double strtod(const char *str, char **endptr)
将参数 str 指向的字符串转换为浮点型(double 类型)。
|
5 |
long int strtol(const char *str, char **endptr, int base)
将参数 str 指向的字符串转换为长整型(long int 类型)。
|
6 |
unsigned long int strtoul(const char *str, char **endptr, int base)
将参数 str 指向的字符串转换为无符号长整型(unsigned long int 类型)。
|
7 |
void *calloc(size_t nitems, size_t size)
分配请求的内存并返回指向该内存的指针。
|
8 |
void free(void *ptr
释放先前通过调用 calloc、malloc 或 realloc 分配的内存。
|
9 |
void *malloc(size_t size)
分配请求的内存并返回指向该内存的指针。
|
10 |
void *realloc(void *ptr, size_t size)
尝试调整 ptr 指向的内存块的大小,该内存块之前已通过调用 malloc 或 calloc 分配。
|
11 |
void abort(void)
导致程序异常终止。
|
12 |
int atexit(void (*func)(void))
导致程序终止时调用指定的函数 func正常终止。
|
13 |
void exit(int status)
使程序正常终止。
|
14 |
char *getenv(const char *name)
搜索名称指向的环境字符串,并将关联值返回给该字符串。
|
15 |
int system(const char *string)
将字符串指定的命令传递给主机环境,由命令处理器执行。
|
16 |
void *bsearch(const void *key, const void *base, size_t nitems, size_t size, int (*compar)(const void *, const void *))
执行二分查找。
|
17 |
void qsort(void *base, size_t nitems, size_t size, int (*compar)(const void *, const void*))
对数组进行排序。
|
18 |
int abs(int x)
返回 x 的绝对值。
|
19 |
div_t div(int numer, int denom)
将 numer(分子)除以 denom(分母)。
|
20 |
long int labs(long int x)
返回 x 的绝对值。
|
21 |
ldiv_t ldiv(long int numer, long int denom)
将 numer(分子)除以 denom(分母)。
|
22 |
int rand(void)
返回 0 到 RAND_MAX 范围内的伪随机数。
|
23 |
void srand(unsigned int seed)
此函数为函数 rand 使用的随机数生成器设定种子。
|
24 |
int mblen(const char *str, size_t n)
返回参数 str 指向的多字节字符的长度。
|
25 |
size_t mbstowcs(schar_t *pwcs, const char *str, size_t n)
将参数 str 指向的多字节字符串转换为 pwcs 指向的数组。
|
26 |
int mbtowc(whcar_t *pwc, const char *str, size_t n)
检查参数 str 指向的多字节字符。
|
27 |
size_t wcstombs(char *str, const wchar_t *pwcs, size_t n)
将数组 pwcs 中存储的代码转换为多字节字符,并将其存储在字符串中str.
|
28 |
int wctomb(char *str, wchar_t wchar)
检查与参数 wchar 给出的多字节字符对应的代码。
|