网站大量收购独家精品文档,联系QQ:2885784924

c语言库函数使用大全.pdf

  1. 1、本文档被系统程序自动判定探测到侵权嫌疑,本站暂时做下架处理。
  2. 2、如果您确认为侵权,可联系本站左侧在线QQ客服请求删除。我们会保证在24小时内做出处理,应急电话:400-050-0827。
  3. 3、此文档由网友上传,因疑似侵权的原因,本站不提供该文档下载,只提供部分内容试读。如果您是出版社/作者,看到后可认领文档,您也可以联系本站进行批量认领。
查看更多
C 语言库函数使用大全 C 语言库函数使用大全 (网络版) 1-257 C 语言库函数使用大全 函数名: abort 功能: 异常终止一个进程 用法: void abort(void); 程序例: #include stdio.h #include stdlib.h int main(void) { printf(Calling abort()\n); abort(); return 0; /* This is neve r reached */ } 函数名: abs 功能: 求整数的绝对值 用法: int abs(int i); 程序例: #include stdio.h #include math.h int main(void) { int number = - 1234; printf(number: %d absolute value: %d\n, number, abs(number)); return 0; } 函数名: absread, abswirte 功能: 绝对磁盘扇区读、写数据 用法: int absread(int drive, int nsects, int sectno, void *buffer); int abswrite(int drive, int nsects, in tsectno, void *buffer); 程序例: /* absread example */ #include stdio.h #include conio.h #include process.h #include dos.h int main(void) { int i, strt, ch_out, sector; char buf[512]; 2-257 C 语言库函数使用大全 printf(Insert a diskette into drive A and press any key\n); getch(); sector = 0; if (absread(0, 1, sector, buf) != 0) { perror(Disk problem); exit(1); } printf(Read OK\n); strt = 3; for (i=0; i80; i++) { ch_out = buf[strt+i]; putchar(ch_out); } printf(\n); return(0); } 函数名: access 功能: 确定文件的访问权限 用法: int access(const char *filename, int amode); 程序例: #include stdio.h #include io.h int file_exists(char *filename); int main(void) { printf(Does NOTEXIST.FIL exist: %s\n, file_exists(NOTEXISTS.FIL) ? YES : NO); return 0; } int file_exists(char *filename) { return (access(filename, 0) == 0); } 函数名: acos 功能: 反余弦函数 用法: double acos(double x); 程序例: #include stdio.h #include math.h 3-257 C 语言库函数使用大全 int main(void) { double result; double x = 0.5; result = acos(x); printf(The arc cosine of %lf is %lf\n, x, result); return 0; } 函数名: allocmem 功能: 分配DOS 存储段 用法: int allocmem(unsigned size, unsigned *seg); 程序例: #include dos.h #include alloc.

文档评论(0)

I LOVE YOU + 关注
实名认证
内容提供者

该用户很懒,什么也没介绍

1亿VIP精品文档

相关文档