May be this code works.
Warning This code is not compiled/tested.
int highlight_option(int index)
{
int i;
char menu[4][6] = {"Print", "1", "2", "Exit"};
clrscr();
for (i = 0; i < 4; i++) {
if (i == index) {
textbackground(WHITE);
textcolor(BLACK);
cprintf("%s\n", menu[i]);
textbackground(BLACK);
textcolor(WHITE);
} else {
printf("%s\n", menu[i]);
}
}
return 0;
}
Call this function from the arrow handler, pass i + 1
or i - 1
to this function before the gotoxy