c语言各函数开头叫什么作用,C语言函数大全(d开头)

d994b863ba883f07beb9bc7070ca043c.png

函数名: delay

功 能: 将程序的执行暂停一段时间(毫秒)

用 法: void delay(unsigned milliseconds);

程序例:

/* Emits a 440-Hz tone for 500 milliseconds */

#include

int main(void)

{

sound(440);

delay(500);

nosound();

return 0;

}

函数名: delline

功 能: 在文本窗口中删去一行

用 法: void delline(void);

程序例:

#include

int main(void)

{

clrscr();

cprintf("The function DELLINE deletes \

the line containing the\r\n");

cprintf("cursor and moves all lines \

below it one line up.\r\n");

cprintf("DELLINE operates within the \

currently active text\r\n");

cprintf("window. Press any key to \

continue . . .");

gotoxy(1,2); /* Move the cursor to the

second line and first column */

getch();

delline();

getch();

return 0;

}

函数名: detectgraph

功 能: 通过检测硬件确定图形驱动程序和模式

用 法: void far detectgraph(int far *graphdriver, int far *graphmode);

程序例:

#include

#include

#include

#include

/* names of the various cards supported */

char *dname[] = { "requests detection",

"a CGA",

"an MCGA",

"an EGA",

"a 64K EGA",

"a monochrome EGA",

"an IBM 8514",

"a Hercules monochrome",

"an AT&T 6300 PC",

"a VGA",

"an IBM 3270 PC"

};

int main(void)

{

/* returns detected hardware info. */

int gdriver, gmode, errorcode;

/* detect graphics hardware available */

detectgraph(&gdriver, &gmode);

/* read result of detectgraph call */

errorcode = graphresult();

if (errorcode != grOk) /* an error

occurred */

{

printf("Graphics error: %s\n", \

grapherrormsg(errorcode));

printf("Press any key to halt:");

getch();

exit(1); /* terminate with an error

code */

}

/* display the information detected */

clrscr();

printf("You have %s video display \

card.\n", dname[gdriver]);

printf("Press any key to halt:");

getch();

return 0;

}

2829f2ca24f0d0090cbba57f30759f23.png

C语言函数大全(d开头).doc

下载Word文档到电脑,方便收藏和打印[全文共1062字]

编辑推荐:

8b95f2eb3d3f7ce4dc3bf1178c74941e.png

8b95f2eb3d3f7ce4dc3bf1178c74941e.png

8b95f2eb3d3f7ce4dc3bf1178c74941e.png

8b95f2eb3d3f7ce4dc3bf1178c74941e.png

8b95f2eb3d3f7ce4dc3bf1178c74941e.png

下载Word文档

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值