Source Code File 03-02_annoy
03-02_annoy.c
#include <ncurses.h>
#define COUNT 5
int main()
{
char text[COUNT][10] = {
"Do", "you", "find", "this", "silly?"
};
int a,b;
initscr();
for(a=0;a<COUNT;a++)
{
for(b=0;b<COUNT;b++)
{
if(b==a) attrset(A_BOLD | A_UNDERLINE);
printw("%s",text[b]);
if(b==a) attroff(A_BOLD | A_UNDERLINE);
addch(' ');
}
addstr("\b\n");
}
refresh();
getch();
endwin();
return 0;
}
Output Screenshot

Notes
* Not every terminal shows output similar to what appears above. Some may just show underline or bold, not both.
Copyright © 1997-2025 by QPBC.
All rights reserved
