Tuesday, February 23, 2010

  • The gotoxy() funtion is used to simply move the cursor on your monitor screen wherever desired.
  • It is declared in the "conio.h" header file.
  • It takes 2 parameters, gotoxy(int x, int y). The 1st parameter specifies the x-co-ordinate on the screen, i.e., horizontal position(from left to right) on the screen. The 2nd parameter specifies the y-co-ordinate on the screen, i.e., Vertical position(from top to bottom) on the screen. Thus, gotoxy(1,1) tells the compiler to move the cursor to the left-top-most corner of the screen.
  • The use is demonstrated in the following example:
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
printf("This is the normal cursor position.");
gotoxy(36,25);
printf("This is the changed cursor position.");
getch();
}

1 comment:

  1. 10-piece Classic Style - Titanium Frames
    These Classic Style Classic and Vintage babyliss nano titanium Style Frames come together in an 2019 ford edge titanium for sale amazing The suppliers of metal premium style seiko titanium watch of the premium frame, created by Iron Man Steel, titanium earrings sensitive ears is

    ReplyDelete