Saturday, April 6, 2013

gotoxy in c

gotoxy in c: gotoxy function places cursor at a desired location on screen i.e. we can change cursor position using gotoxy function.
Declaration : void gotoxy( int x, int y);
where (x, y) is the position where we want to place the cursor.

C programming code for gotoxy

#include<stdio.h>
#include<conio.h>
 
main()
{
   int x, y;
 
   x = 10;
   y = 10;
 
   gotoxy(x, y);
 
   printf("C program to change cursor position.");
 
   getch();
   return 0;
}
Output:
gotoxy function code output
AttachmentSize
gotoxy.png4.17 KB

No comments:

Post a Comment