outtext() function in C
Last Updated :
06 Dec, 2019
The header file graphics.h contains outtext() function which displays text at current position.
Syntax :
void outtext(char *string);
Examples :
Input : string = "Hello Geek, Have a good day !"
Output :
Input : string = "GeeksforGeeks is the best !"
Output :
Note : Do not use text mode functions like printf while working in graphics mode. Ensure that the text doesn’t go beyond the screen while using outtext.
Below is the implementation for outtext() function:
#include <graphics.h>
int main()
{
int gd = DETECT, gm;
initgraph(&gd, &gm, "" );
outtext( "Hello Geek, Have a good day !" );
getch();
closegraph();
return 0;
}
|
Output :
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...