getch () function returns two keycodes for arrow keys. Arrow put to getch '\033'
and '[' and letter from A to D (up, down, right, left) so code will be something like:
if (getch() == '\033') {
getch(); // [ value
switch(getch())
{
case 'A':
// your code
case 'B':
// your code
case 'C':
//your code
case 'D':
//your code
}
}