setbkcolor() function

Declaration of setbkcolor() function

void setbkcolor(int color);

setbkcolor function changes current background color e.g. setbkcolor(YELLLOW) changes the current background color to YELLOW.

Remember that default drawing color is WHITE and background color is BLACK.

C programming code for setbkcolor()

 #include<graphics.h> 
 #include<conio.h>
main()
{
	int gd = DETECT, gm;
	initgraph(&gd, &gm, "C:\\ TurboC3\\BGI");
	outtext("Press any key to change the background color to GREEN."); 
	getch();
	setbkcolor(GREEN);
	getch(); 
	closegraph(); 
	return 0;
}