clrscr() should come before the gotoxy and printf
Anyway, what I would do is create a state variable, just to indicate the direction the snake should go, i.e., something that stores if the user pressed 'a' or 'd'.
And I would not leave the loop, just use a if(kbhit) and get the char.
int direction = 1; char control;
while (1)
{
if(kbhit()){
control = getch();
switch (control){
case 'a': direction = -1; break;
case 'd': direction = +1; break;
default: break;
}
}
clrscr( );
gotoxy( h, v );
printf( "<--->" );
delay( 200 );
h = h + direction;
}