# **[](https://en.cppreference.com/w/c/header/curses)** (typically ``) provides terminal control for building text-based user interfaces: window creation, cursor positioning, text attributes, and input handling. It translates portable abstractions into the right escape sequences for any terminal. Use it to build full-screen TUI applications that work across different terminal types. ## Example This example initializes ncurses, draws text at a specific position, and waits for user input. ```c // compile: gcc -o cursesexample cursesexample.c -lncurses // run: ./cursesexample // description: draw positioned text and handle input #include #include int main() { initscr(); int h, w; getmaxyx(stdscr, h, w); mvprintw(h/2, w/2 - 8, "Hello, ncurses!"); mvprintw(h/2 + 1, w/2 - 10, "Terminal: %d x %d", w, h); refresh(); sleep(2); endwin(); return 0; } ```