Clears the terminal screen and frees any virtual memory allocated
to Curses data structures.
Format
#include <curses.h>
void endwin (void);
1 – Description
A program that calls Curses functions must call the endwin
function before exiting to restore the previous environment of
the terminal screen.