Gotoxy function in C++ programming is used to place the position of the cursor on the specific position of the screen by providing x cursor position and y cursor position of the screen.
#include<iostream.h>
#include<conio.h>
#include<stdlib.h> //including Library for working with System Color.
void main()
{
system("color B2"); //giving color to Output Screen.
gotoxy(40, 12); //this is screen location for printing
{
cout<<"Pakistan Zindabad!"; //printing this.
}
getch();
}
//'x' is 'Columns' of the Screen, it value from 0 to 79.
//'y' is 'Rows' of the Screen, it value from 0 to 24.
//like 'gotoxy(x, y);'.