 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you the use of GATY function which is used to find out current Y position. It is declared in Graphics.h header file. I am demonstrating it with the help of Turbo-C. Before starting, you can subscribe my YouTube channel by clicking on the link which is available at the bottom right corner of this video. You can download my app Techimus that is available on Google Play. You can connect with me by following these details which are available in front of you. Now, we are going to learn how to use GATY function to find out current Y coordinate position. So, I have included two header files, conu and graphics.h. Then inside main function, three variables gd, gm and y are declared. gd is initialized with detect which will automatically initialize the graphics driver. gm is for graphics mode and y will receive current Y coordinate position. Then str character array is declared. Then init graph function is called which is having three arguments gd, gm and a path c, dc and bgi. So, gd for driver, graphics driver, gm is for graphics mode and this path is containing graphics library. That's why I have used this path. So, init graph function will initialize the graphics. Then to identify current Y coordinate position, I have called GATY function. It will identify current Y coordinate position and that will be assigned into Y. Now, as printer function is called, it will assign this string current Y coordinate position equals to %d into str. This %d will be replaced by the value of Y. So, the string current Y coordinate position equals to and the value will be assigned into str string. Now, to display this str on console, I have called out text xy function. It will display str on 10-20 coordinates. Then get ch for holding the screen. Then close graph will de-allocate the graphics which are initialized using init graph. Return 0 because main's return type is 8. That's why return 0 is return here. Now, I am going to execute this code so that you can understand the output. You can see current Y coordinate position is 0. Now, I am going to change the Y position so that you can see other than 0, Y coordinate position will be also available. So, I am calling move to function here. I have passed two coordinates 34x and 64y. So, move to function change the x or y coordinate position to identify new positions. I am copying these three statements and I am pasting these statements after move to function. Now, you can see the code. Initial Y coordinate position will be displayed using these statements. Then move to will change the cursor position. Then these three statements will identify the new Y coordinate position. I am changing out text xy y coordinate that is 1040. Now, I am executing this code. You can see the output. Beginning Y coordinate position is 0. Then move to function has changed the x or y coordinate position. So, second time Y coordinate position is 60. So, I hope with the help of this getY function, you have understood how you can identify current Y coordinate position. If you want to watch how you can identify current X coordinate position, you can watch my another tutorial which is based on getX function. If you want to watch more programming related videos, you can subscribe my YouTube channel. Thank you for watching this video.