《C语言函数大全(a开头).docx》由会员分享,可在线阅读,更多相关《C语言函数大全(a开头).docx(3页珍藏版)》请在金锄头文库上搜索。
1、 C语言函数大全(a开头)功 能: 特别终止一个进程用 法: void abort(void);程序例:#include#includeint main(void)printf(“Calling abort()n“);abort();return 0; /* This is never reached */ 函数名: abs 功 能: 求整数的肯定值用 法: int abs(int i);程序例:#include#includeint main(void)int number = -1234;printf(“number: %d absolute value: %dn“, number, ab
2、s(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#include#include#includeint main(void)int i, strt, ch_out, sector;char buf512;printf(“Insert a diskette into drive A and press any keyn“);getch();sector = 0;if (absread(0, 1, sector,exit(1);printf(“Read OKn“);strt = 3;for (i=0; i80; i+)ch_out = bufstrt+i;putchar(ch_out);printf(“n“);return(0);