Actually clearing the screen varies from terminal to terminal. You could use termcap or curses routines to do it. You could also run the clear command via system(). Finally, you could use a '\f' in an printf, this will do a form-feed which will simulate a clear screen but is not as pretty.