| C语言库函数(C类字母) |
|
| 作者:未知 文章来源:网络收集 点击数: 更新时间:2006-3-29 15:22:24
|
(); exit(1); /* terminate with an error code */ }
x = getmaxx() / 2; y = getmaxy() / 2;
/* output a message */ settextjustify(CENTER_TEXT, CENTER_TEXT); outtextxy(x, y, "Press a key to close the graphics system:");
/* wait for a key */ getch();
/* closes down the graphics system */ closegraph();
printf("We're now back in text mode.\n"); printf("Press any key to halt:"); getch(); return 0; }
函数名: clreol 功 能: 在文本窗口中清除字符到行末 用 法: void clreol(void); 程序例:
#include
int main(void)
{ clrscr(); cprintf("The function CLREOL clears all characters from the\r\n"); cprintf("cursor position to the end of the line within the\r\n"); cprintf("current text window, without moving the cursor.\r\n"); cprintf("Press any key to continue . . ."); gotoxy(14, 4); getch();
clreol(); getch();
return 0; }
函数名: clrscr 功 能: 清除文本模式窗口 用 法: void clrscr(void); 程序例:
#include
int main(void) { int i;
clrscr(); for (i = 0; i < 20; i++) cprintf("%d\r\n", i); cprintf("\r\nPress any key to clear screen"); getch();
clrscr(); cprintf("The screen has been cleared!"); getch();
return 0; }
函数名: coreleft 功 能: 返回未使用内存的大小 用 法: unsigned coreleft(void); 程序例:
#include #include
int main(void) { printf("The difference between the highest allocated block and\n"); printf("the top of the heap is: %lu bytes\n", (unsigned long) coreleft());
return 0; }
函数名: cos 功 能: 余弦函数 用 法: double cos(double x); 程序例:
#include #include
int main(void) { double result; double x = 0.5;
result = cos(x); printf("The co上一页 [1] [2] [3] [4] [5] [6] [7] [8] [9] 下一页
|
|
[ 收藏此页到: 天天|和讯|博采|ViVi|狐摘|我摘|天极 ] 文章录入:kinda 责任编辑:kinda |
|
上一篇文章: C语言库函数(B类字母) 下一篇文章: C语言库函数(D类字母) |
| 【字体:小 大】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口】 |