Outtext() Function

outtext() function is used to display the string at the current position on the screen. This function displays the given string in the graphics mode. It uses the settextstyle() function in order to set the font style of the string and moveto() function in order to change current position.


void outtext(char *string);
  • outtext() function is a function which contains single parameter that is string.
  • Parameter string specifies the string which is going to be display on the screen.
  • For better understanding go through the program:





void main()


int gd=DETECT, gm;

initgraph(&gd,&gm," ");

outtext("C graphics programming is too interesting");




Above program will display the message "C graphics programming is too interesting" at current position on the screen by using outtext() function. To print a message at a specified location use outtextxy() function.


c graphics