Professional Documents
Culture Documents
CGR1 Text Mode
CGR1 Text Mode
POLYTECHNIC, KOPARGAON
With NBA ACCREDIATED programs , Approved by AICTE, New Delhi,
Recognized by Govt. of Maharashtra, Affiliated to Maharashtra State Board of Technical Education, Mumbai,
ISO 9001:2015 Certified Institute
1) Window( ):- This function specifies a window on screen. The four integer co-
ordinates of the window are passed as parameters to this function.
Syntax- window(left, top, right, bottom);
2) putch( ): It displays a single character at cursor position.
Syntax – putch( char);
Example- putch(‘A’);
Displays character A at specified cursor position.
3) clrscr( ): It clears the entire screen and locates the cursor in top left corner of
screen i.e(1,1).
Syntax – clrscr( );
Sanjivani K.B.P. Polytechnic, Kopargaon Department
of Computer Engg A. L. Deokate
• 4) gotoxy( ): It positions the cursor to the specified location on screen, where
location is specified by x, y co-ordinates of the point.
• Syntax – gotoxy(x, y);
• Where x, y are co-ordinates of a point where cursor is to be positioned.
• Example: gotoxy(3, 4);
• It positions cursor to 3rd row, 4th column.
• 5) puts( ): It display string at cursor position.
• Syntax – puts(s1);
• Where, s1 is string to be displayed at specified cursor position. For puts( ) and
putch( ) functions, gotoxy( ) can be used.
Sanjivani K.B.P. Polytechnic, Kopargaon Department
of Computer Engg A. L. Deokate
• Example: gotoxy(3, 4);
• puts(“Hello”);
• gotoxy(10,10);
• putch(‘A’)
• Here, Hello is displayed starting from the position 3,4 and ‘A’ is
displayed at 10,10.
• 6) textcolor( ): It sets the colour for the text. Any text displayed after
this command will be displayed in a colour specified by this
command. The supported colours are numbered from 0 to 15.
Sanjivani K.B.P. Polytechnic, Kopargaon Department
of Computer Engg A. L. Deokate
Colour constant Colour name
0 BLACK
1 BLUE
2 GREEN
3 CYAN
4 RED
5 MAGENTA
6 BROWN
7 LIGHT GRAY
8 DARK GRAY
9 LIGHT BLUE
10 LIGHT GREEN
11 LIGHT CYAN
12 LIGHT RED
13 LIGHT MAGNETA
14 YELLOW
15 WHITE
128 BLINK