Source Code File 05-02_stdscrsize

05-02_stdscrsize.c

#include <ncurses.h>
   
int main()
{
    initscr();

    printw("Window is %d rows, %d columns.\n",
            LINES,COLS);
    refresh();
    getch();
            
    endwin();
    return(0);
}

Output Screenshot

Notes

* Yes, that's the same screenshot as for 05-01_screensize.c. That's because both examples examine the standard screen on the same terminal program.