 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you the use of move to function to change x and y coordinate positions. This function is available in Graphics.h header file and I will be demonstrating it with the help of TurboC. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at bottom right corner of this video. You can download my app Techimage that is available on Google Play. You can connect with me by following these details which are available in front of you. Now you can see I have included two header file connu and Graphics.h then inside main function three with four variables gd, gm, x and y are declared. gd is initialized with detect. It will automatically identify the graphic driver then character array str is declared then init graph function is called which is having three arguments first argument is gd then second is gm so graphics driver and graphics mode variables addresses as passed here then a path for graphics library c, tc and bji is passed here after initializing the graphics I can call getx and gety functions to identify the current x and y coordinates position so x will be containing current x coordinate position and y will be containing current y coordinate position because I have used getx and gety functions now I am calling s printer function this s printer function is having first argument str this str will be containing this string in this string current x and y position equals to percent d and percent d statement is written these two percent d's will be replaced by x and y respectively first x will be replaced by sorry first percent d will be replaced by x and second percent d will be replaced by y and the complete string will be assigned into str to display it on console I am using out text x y function this function will display the content of str on console on 10 20 coordinates then getch will hold the screen close graph will deallocate the graph and return 0 because return type of main is integer now I am executing this code you can see the output current x and y positions are 0 and 0 now I am going to use move to function so that you can see we can change the cursor position or you can say x and y coordinate positions so move to is passing 30 and 40 so x coordinate will be moving to 30 and y coordinate will be moving to 40 position I am copying these statements and I am pasting it just after the move to function call you can see this code these statements identify the beginning x and y coordinate positions then move to is changing the coordinate position and again I have identified the coordinate positions this time I am changing this y coordinate so out text x y will print second message on 10 40 coordinates I am changing these coordinates because two statements will be printed on two separate positions now you can see the output current x and y positions are 0 and 0 this is because of first a get x and get y function call then current x and y positions equals to 30 and 40 this is because of second get x and get y function call and these coordinates has changed because of this move to function so friends in case of graphics if you want to change the x and y coordinate positions then you can use move to function anywhere anytime and any number of times so I hope you have understood how I am using move to get x and get y functions together to changing and to identifying the x and y coordinate positions if you want to watch more programming related videos you can subscribe my youtube channel that is sanjay gupta underscore tech school thank you for watching this video