Gotoxy

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 1

GotoXY is a function or procedure that positions the cursor at (X,Y), X in horizontal, Y in vertical

direction relative to the origin of the current window. The origin is located at (1,1), the upper-left
corner of the window.

Answer
Description This shows how to use the gotoxy function in C
to move the text cursor to a different location on the screen
Code
#include<stdio.h>
#include<conio.h>
int main(void)

int i;

printf("This is the first line.\n");

gotoxy(10,4);

printf("This is the second line.\n");

gotoxy(20,8);

printf("And this is line 3.\n");

return 0;

You might also like