C语言函数大全-t开头-完整版.docVIP

  1. 1、本文档共7页,可阅读全部内容。
  2. 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
  3. 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载
  4. 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
  5. 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
  6. 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们
  7. 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
  8. 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
C语言函数大全(t开头) 函数名: tell 功能: 取文件指针的当前位置 用法: long tell(int handle); 程序例: #include #include #include #include int main(void) { int handle; char msg[] = Hello world; if ((handle = open(TEST.$$$, O_CREAT | O_TEXT | O_APPEND)) == -1) { perror(Error:); return 1; } write(handle, msg, strlen(msg)); printf(The file pointer is at byte %ld\n, tell(handle)); close(handle); return 0; } 函数名: textattr 功能: 设置文本属性 用法: void textattr(int attribute); 程序例: #include int main(void) { int i; clrscr(); for (i=0; i9; i++) { textattr(i + ((i+1) 4)); cprintf(This is a test\r\n); } return 0; } 函数名: textbackground 功能: 选择新的文本背景颜色 用法: void textbackground(int color); 程序例: #include int main(void) { int i, j; clrscr(); for (i=0; i9; i++) { for (j=0; j80; j++) cprintf(C); cprintf(\r\n); textcolor(i+1); textbackground(i); } return 0; } 函数名: textcolor 功能: 在文本模式中选择新的字符颜色 用法: void textcolor(int color); 程序例: #include int main(void) { int i; for (i=0; i15; i++) { textcolor(i); cprintf(Foreground Color\r\n); } return 0; } 函数名: textheight 功能: 返回以像素为单位的字符串高度 用法: int far textheight(char far *textstring); 程序例: #include #include #include #include int main(void) { /* request auto detection */ int gdriver = DETECT, gmode, errorcode; int y = 0; int i; char msg[80]; /* initialize graphics and local variables */ initgraph(gdriver, gmode, ); /* read result of initialization */ 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 */ } /* draw some text on the screen */ for (i=1; i11; i++) { /* select the text style, direction, and size */ settextstyle(TRIPLEX_FONT, HORIZ_DIR, i); /* create a message string */ sprintf(msg, Size: %d, i); /* output the message */ outtextxy(1, y, msg); /* advance to the next text line */ y += textheight(msg); } /* clean up */ getch(); closegraph(); return 0; } 函数名: textmode 功能: 将屏幕设置成文本模式 用法: void textmode(int mode); 程序例: #include in

文档评论(0)

hong333666 + 关注
实名认证
文档贡献者

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

1亿VIP精品文档

相关文档