 Hello friends I am Sanjay Gupta in this video I am going to demonstrate you a function close graph that is used in graphics in C 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 bottom right corner of this video you can follow my YouTube channel that is available in front of you you can download my app Techimus that is available on Google Play you can connect with me by following my email ID or WhatsApp number now I am going to demonstrate you the use of close graph function which is available in graphics.h header file so I am including this header file second I am including on your dot H now I am defining main function inside main function I have to declare a variable gd it is initialized with detect and second variable is gm gd stands for graphics driver it is initialized with detect so it will automatically detect the default graphics which are available for your computer system and gm is for graphics mode now if you want to use graphics using turbo C then you have to initialize it first so I am passing these variables inside init graph function and also I have to mention the graphics library path that is C TC BGI so init graph function is containing three arguments gd gm and the path where graphics library is available now if I want to display something on console for that purpose I am using out text x1 in out text xy function I have passed three arguments first one is x coordinate second one is y coordinate and third one is the text which will be displayed on console now get ch function and then close graph function at last time using return 0 so this close graph function is used to this this close graph function is used to restore the initial setting of the graphics whenever we use close graph function at the end of any function then it deallocates all the memory which is allocated by the graphics functions so if you want to initialize your graphics then you have to use init graph function that I have used here and if you want to deallocate all the graphics settings then you can use close graph function it real restores the setting which was available before using init graph function so init graph is for initialization and close graph is for deallocation of graphics memory now I am going to execute this code so first I am saving this file I am compiling it now I am executing it you can see it is showing the text properly on the desired position so friends I hope you have understood how you can use close graph function in your graphics code with the use of close graph I have also used init graph and out text xy functions which are available in graphics dot h header file so if you want to watch more programming related videos you can subscribe my youtube channel that is sanjaygupta underscore tax school thank you for watching this video