C语言中的#include <stdlib.h;文件的作用

Posted iqyqqqqqq

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C语言中的#include <stdlib.h;文件的作用相关的知识,希望对你有一定的参考价值。

1、简单了解

#include < stdlib.h > 

stdlib.h中,包含了C语言的一些常用库函数。
动态内存相关的malloc, realloc,zalloc,calloc,free等。
随机数相关的rand,srand等。
系统相关的system, getenv,setenv等。
字符串转数值函数,atoi, atof,strtoul等。
如果在代码中,调用了这个头文件中的函数或者宏定义,则需引用该头文件。

2、五种类型

#include <assert.h>    //设定插入点
#include <ctype.h>     //字符处理
#include <errno.h>     //定义错误码
#include <float.h>     //浮点数处理
#include <fstream.h>    //文件输入/输出
#include <iomanip.h>    //参数化输入/输出
#include <iostream.h>   //数据流输入/输出
#include <limits.h>    //定义各种数据类型最值常量
#include <locale.h>    //定义本地化函数
#include <math.h>     //定义数学函数
#include <stdio.h>     //定义输入/输出函数
#include <stdlib.h>    //定义杂项函数及内存分配函数
#include <string.h>    //字符串处理
#include <strstrea.h>   //基于数组的输入/输出
#include <time.h>     //定义关于时间的函数
#include <wchar.h>     //宽字符处理及输入/输出
#include <wctype.h>    //宽字符分类

以上是关于C语言中的#include <stdlib.h;文件的作用的主要内容,如果未能解决你的问题,请参考以下文章

include <u8g2lib.h>含义

C语言中的inotify文件

200行以上C语言程序举例

C语言:随机抽奖

求一个100到150条的C语言程序

C语言文件读取时读不到文件