C语言中printf和cprintf有什么区别啊

printf()格式化输出;cprintf()格式化输出。
printf()不受文本颜色、光标的控制,cprintf()受到这些的控制。
举个列子:
#include<stdio.h>
#include<conio.h>

int main()
{
gotoxy(10,10);//是光标跳到(10,10)处
settextcolor(RED);//设置文本颜色为红色
printf("This is a test!");
cprintf("This is a test!");
return 0;
}
注:
此程序只能在Turbo c中运行。
gotoxy() 不是c标准库中的函数,同理,settextcolor() 也一样。
posted @ 2017-09-30 15:26  TZB_007  阅读(870)  评论(0编辑  收藏  举报