- 1、本文档共7页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 5、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 6、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 7、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 8、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
C语言函数大全(t开头)
函数名: tell
功能: 取文件指针的当前位置
用法: long tell(int handle);
程序例:
#include#include#include#includeint 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);
程序例:
#includeint 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);
程序例:
#includeint 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);
程序例:
#includeint 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#includeint 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);
程序例:
#includein
您可能关注的文档
- C语言程序设计2012秋第三套作业.doc
- C语言程序设计 阅读程序题库及答案.doc
- c语言程序设计 第四章 输入输出和简单的顺序结构.doc
- c语言程序设计 第五章 程序控制流程——选择结构.doc
- C语言程序设计 函数试题.doc
- C语言程序设计 实验三 选择结构程序设计 答案《西北民大 电气学院》.doc
- C语言程序设计 题库管理系统.doc
- C语言程序设计 习题大全(含答案) C语言-2.doc
- C语言程序设计(B)试卷.doc
- C语言程序设计(第三版)笔记——谭浩强.doc
- 2025年基于大数据的线上语言翻译教育平台学习效果评估研究.docx
- 2025年社区卫生服务中心智慧化升级对公共卫生服务的优化策略.docx
- 2025年成人教育终身学习体系构建与平台运营:终身学习平台内容生态构建与运营策略报告.docx
- 城市照明节能改造项目实施方案与施工工艺报告.docx
- 2025年内河航运绿色航运金融产品风险控制研究.docx
- 智慧农业无人机智能化系统在农业种植中的应用效果评估与优化.docx
- 2025年有声读物市场发展策略研究报告:品牌合作与跨界营销.docx
- 2025年建筑节能技术创新:被动式超低能耗建筑原理与智能化应用报告.docx
- 家长教师进课堂课件.pptx
- 2025年在线教育学员学习动机与课程内容创新策略研究报告.docx
文档评论(0)