• Have Any Question?
  • contact@eitworld.com

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.

Declaration

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:

Program

#include<stdio.h>

#include<conio.h>

#include<graphics.h>

void main()

{

int gd=DETECT, gm;

initgraph(&gd,&gm,” “);

outtext(“C graphics programming is too interesting”);

getch();

closegraph();

}

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.

Output

c graphics



Real Time Web Analytics