Source Code File 06-07_text5
06-07_text5.c
#include <ncurses.h>
int main()
{
char text1[] = "This is the first line\n";
char text2[] = "Line two here";
char text3[] = "The third line\n";
char text4[] = "Fourth line here\n";
char text5[] = "And the fifth line\n";
initscr();
addstr(text1);
addstr(text3);
addstr(text5);
refresh();
getch();
move(1,0);
insstr(text2);
refresh();
getch();
endwin();
return 0;
}
Output Screenshot

(Click image to update.)
Notes
* Unlike other code in this chapter, this one removes the newline from the end of string text2[].
Copyright © 1997-2025 by QPBC.
All rights reserved
