c语言常用函数手册 chm格式

c语言常用函数手册 chm格式

ID:1355249

大小:39.00 KB

页数:10页

时间:2017-11-10

c语言常用函数手册 chm格式_第1页
c语言常用函数手册 chm格式_第2页
c语言常用函数手册 chm格式_第3页
c语言常用函数手册 chm格式_第4页
c语言常用函数手册 chm格式_第5页
资源描述:

《c语言常用函数手册 chm格式》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库

1、c语言常用函数手册chm格式http://www.softii.com/downinfo/19389.html 全都很详细 例如下面的 函数名:abort功 能:异常终止一个进程用 法:voidabort(void);程序例:#include#includeintmain(void){ printf("Callingabort()"); abort(); return0;/*Thisisneverreached*/}  函数名:abs功 能:求整数的绝对值用 法:intabs(inti);程序例:#include#include<

2、math.h>intmain(void){ intnumber=-1234; printf("number:%d absolutevalue:%d",number,abs(number)); return0;}  函数名:absread,abswirte功 能:绝对磁盘扇区读、写数据用 法:intabsread(intdrive,intnsects,intsectno,void*buffer); intabswrite(intdrive,intnsects,intsectno,void*buffer);程序例:/*absreadexample*/#include#in

3、clude#include#includeintmain(void){ inti,strt,ch_out,sector; charbuf[512]; printf("InsertadisketteintodriveAandpressanykey"); getch(); sector=0; if(absread(0,1,sector,&buf)!=0) {    perror("Diskproblem");    exit(1); } printf("ReadOK"); strt=3; for(i=0;i<80;i++) {   

4、 ch_out=buf[strt+i];    putchar(ch_out); } printf(""); return(0);}   函数名:access功 能:确定文件的访问权限用 法:intaccess(constchar*filename,intamode);程序例:#include#includeintfile_exists(char*filename);intmain(void){ printf("DoesNOTEXIST.FILexist:%s", file_exists("NOTEXISTS.FIL")?"YES":"NO"); re

5、turn0;}intfile_exists(char*filename){ return(access(filename,0)==0);} 函数名:acos功 能:反余弦函数用 法:doubleacos(doublex);程序例:#include#includeintmain(void){ doubleresult; doublex=0.5; result=acos(x); printf("Thearccosineof%lfis%lf",x,result); return0;}  函数名:allocmem功 能:分配DOS存储段用 法:intalloc

6、mem(unsignedsize,unsigned*seg);程序例:#include#include#includeintmain(void){ unsignedintsize,segp; intstat; size=64;/*(64x16)=1024bytes*/ stat=allocmem(size,&segp); if(stat==-1)    printf("Allocatedmemoryatsegment:%x",segp); else    printf("Failed:maximumnumberofparagraphsa

7、vailableis%u",           stat); return0;}  函数名:arc功 能:画一弧线用 法:voidfararc(intx,inty,intstangle,intendangle,intradius);程序例:#include#include#include#includeintmain(void){   

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。