The alternate screen is used by many \"user-interactive\" terminal applications like vim, htop, screen, alsamixer, less, ... It is like a different buffer of the te
For C console application:
ncurses
Wikipedia:
ncurses (new curses) is a programming library that provides an API which allows the programmer to write text-based user interfaces in a terminal-independent manner.
less
uses this library.
A hello world program from here, to compile it in gcc, flag -lncurses is needed.
#include
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}