 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can use a function clear device which is available in graphics in C. I am demonstrating it with the help of turbo C. Before starting, you can note my YouTube channel link that is sanjaygupta.disco.tech school. You can also download my app tag image that contains various programming related material. Now coming on to the topic. First of all, I am including two header files. First one is graphics.h and second one is conure.h. Now I am implementing main function. Here I am declaring first variable that is gd, which is for graphics driver. I have initialized it with detect. So it will automatically detect the computer hardware's graphics driver and gm is for graphics mode. To initialize graphics, I have to use initgraph function. Inside initgraph function, I have to pass first argument gd, second argument gm and then path of graphics library that is c, tc and bgi. So these three arguments are required with initgraph function. First one is graphics driver, second one is graphics mode and third one is the path where graphics library is available. Now I am using another function out text x, y. This function plays a particular text on x or y coordinates. So I have written hello friends as a text which will be displayed on coordinates 10, 20. 10 is x coordinate and 20 is y coordinate. Now I am using getch function. It will help to hold the output screen. Then return 0 because return type of main function is integer. Now I am saving this code. Then I am compiling this code. It is showing no errors and warnings. Now I am executing this code. You can see the output. It is showing hello friends. Now I am pressing enter key. Now we have to understand how we can use clear device function. So now I am using this function clear device. This function clears console screen while using graphics. So if you are using graphics and you want to clear your screen, then you can use clear device. You might have used clrscr. If you are not using graphics, but if you are using graphics, then you have to use clear device function. Now I am using out text x, y again. This time I am using coordinates 30 comma 50 and this time I am displaying name of my YouTube channel. And again getch. Now when I will be executing this code, first it will display hello friends. Then screen will be hold. Then I will be pressing enter key. Then clear device will clean the contents which are available on console. And then next output sanjay gupta underscore text school will be displayed. So I hope you have understood the use of clear device function. Now I am executing this code. Before that I am saving this code. I am compiling it. Now I am executing it. You can see it is showing hello friends. Now I am pressing enter key and it has cleared hello friends contain and now it is displaying sanjay gupta underscore text school. So friends with the help of this example, you have understood how you can use clear device function while using graphics in C in turbo C. You can use this function more than one time whenever required in your code. So implement this concept in your system so that you can understand this concept well. If you want to watch more programming related videos, you can subscribe my YouTube channel. You can also download my app tag MS that is available on Google Play. Thank you for watching this video.