Coding

outtext function

outtext function - c programming - outtext function displays text at current position. Declaration :- void outtext(char *string)

outtext function displays text at current position.

Declaration :- void outtext(char *string);

C programming code for outtext

#include<graphics.h>
#include<conio.h>
 
main()
{
   int gd = DETECT, gm;
 
   initgraph(&gd, &gm, "C:\\TC\\BGI");
 
   outtext("To display text at a particular position on the screen use outtextxy");
 
   getch();
   closegraph();
   return 0;
}

Do not use text mode functions like printf, gotoxy etc while working in graphics mode. Also note ‘\n’ or other escape sequences do not work in graphics mode. You have to ensure that the text doesn’t go beyond the screen while using outtext

READ  Java Program Find the node with minimum value in a Binary Search Tree

About the author

Wikitechy Editor

Wikitechy Editor

Wikitechy Founder, Author, International Speaker, and Job Consultant. My role as the CEO of Wikitechy, I help businesses build their next generation digital platforms and help with their product innovation and growth strategy. I'm a frequent speaker at tech conferences and events.

X