C标准函数库

来源:互联网 发布:python open 编辑:程序博客网 时间:2024/05/16 18:13

1、函数库包含的头文件有:

(1)ctype.h(2)string.h(3)stdlib.h(4)math.h(5)time.h(6)alloc.h(7)mem.h(8)conio.h(9)stdio.h(10)io.h(11)dir.h(12)process.h

(13)dos.h(14)bios.h(15)assert.h(16)graphics.h(17)system.h(18)setjmp.h(19)signal.h(20)stdarg.h(21)float.h


2、分类说明(也一定程度上体现了C语言可以完成的功能)如下:

 字符判别函数:ctype.h
(1)字符串相关:string.h、stdarg.h(vsprintf等)
 转换函数:stdlib.h(字符串转数字,数字转字符串)
 数学计算:math.h(数学计算sin,pow等)
 时间计算:time.h(和math.h一样同为完成特定计算)

(2)内存相关:内存分配:stdlib.h(malloc,calloc,free等)
                              alloc.h(近/远堆操作:brk,farcalloc,farfree)
              内存操作:mem.h(memset等)

(3)I/O相关:初级I/O:conio.h(getch,cputs)

 stdio.h(printf等)
       文件I/O:io.h(open,close,create,chmod等)

stdio.h(fwrite等)
       目录操作:dir.h(mkdir,getcwd等)

(4)进程:process.h

(5)硬件:system.h(getkey等)
           dos.h(中断,磁盘读写等)
           bios.h

(6)诊断:assert.h(assert)
           stdio.h(perror等)

(7)图形:graphics.h
           system.h(填充函数,滚动条,汉字编码)

(8)其它:setjmp.h
           signal.h(raise等)
           stdarg.h(很重要,包含多参数va_start、va_end)
           float.h


3、像网络编程(socket),进程管理(getpid等)则是和具体操作系统相关,不是标准C的内容。

0 0
原创粉丝点击