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.
Syntax :
void cleardevice();
Below is the implementation of cleardevice() in C:
Output:
On executing the program, the output window looks like :
👁 Image
On pressing any key :
👁 Image
To exit, press any key.
👁 Image