-->

program to display a text with background colour.

using turbo c++
--------------------------------------------------------------------------------------
//program to set background color.
#include<stdio.h>
#include<conio.h>
#include<graphics.h>
void main()
{
clrscr();
int gdriver = DETECT, gmode;
/* initialize graphics and local variables */
initgraph(&gdriver, &gmode, "c:\\tc\\bgi");
setbkcolor(BLUE);       //sets background color blue
printf("hello\n");      //prints hello
printf("how r u?");
getch();
closegraph();
}

No comments:

Post a Comment