cleardevice() function in C
The header file graphics.h contains cleardevice() function which clears the screen in graphics mode and sets the current position to (0,0). Clearing the screen consists of filling the screen with current background color.
Below is the implementation of cleardevice() in C:
On executing the program, the output window looks like : On pressing any key : To exit, press any key.