日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

                  歡迎訪問 生活随笔!

                  生活随笔

                  當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

                  编程问答

                  c语言函数 t啥意思,C语言函数大全(t开头)

                  發(fā)布時(shí)間:2024/1/23 编程问答 43 豆豆
                  生活随笔 收集整理的這篇文章主要介紹了 c语言函数 t啥意思,C语言函数大全(t开头) 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

                  函數(shù)名: tell

                  功 能: 取文件指針的當(dāng)前位置

                  用 法: 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;

                  }

                  函數(shù)名: textattr

                  功 能: 設(shè)置文本屬性

                  用 法: void textattr(int attribute);

                  程序例:

                  #include

                  int main(void)

                  {

                  int i;

                  clrscr();

                  for (i=0; i<9; i++)

                  {

                  textattr(i + ((i+1) << 4));

                  cprintf("This is a test\r\n");

                  }

                  return 0;

                  }

                  函數(shù)名: textbackground

                  功 能: 選擇新的文本背景顏色

                  用 法: void textbackground(int color);

                  程序例:

                  #include

                  int main(void)

                  {

                  int i, j;

                  clrscr();

                  for (i=0; i<9; i++)

                  {

                  for (j=0; j<80; j++)

                  cprintf("C");

                  cprintf("\r\n");

                  textcolor(i+1);

                  textbackground(i);

                  }

                  return 0;

                  }

                  函數(shù)名: textcolor

                  功 能: 在文本模式中選擇新的字符顏色

                  用 法: void textcolor(int color);

                  程序例:

                  #include

                  int main(void)

                  {

                  int i;

                  for (i=0; i<15; i++)

                  {

                  textcolor(i);

                  cprintf("Foreground Color\r\n");

                  }

                  return 0;

                  }

                  函數(shù)名: 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; i<11; 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;

                  }

                  函數(shù)名: textmode

                  功 能: 將屏幕設(shè)置成文本模式

                  用 法: void textmode(int mode);

                  程序例:

                  #include

                  int main(void)

                  {

                  textmode(BW40);

                  cprintf("ABC");

                  getch();

                  textmode(C40);

                  cprintf("ABC");

                  C語言函數(shù)大全(t開頭).doc

                  下載Word文檔到電腦,方便收藏和打印[全文共1463字]

                  編輯推薦:

                  下載Word文檔

                  總結(jié)

                  以上是生活随笔為你收集整理的c语言函数 t啥意思,C语言函数大全(t开头)的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

                  如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。