Yeah I did the same thing on a program of mine only i used the keys E=left, D=down, E=up, and F=right. In my program I put it in it's own function so I only had to type PLAYER(); in the main() function. The code is this.
Tell me if that solves your question.
/* int X and Y tell where the player is
int oldX and oldY tell where the player moved from (to clear that spot)
int X=1, Y=1, oldX, oldY;
/* This is where the computer knows where to put
the player and set it up to clear the last place
the player was so you don't see a trail of O's. */
/* This is the part where it gets the input
and sees if they moved left, right, up, or down. */
default: //if they hit keys other then EDSF print this
printf("Move with E, D, S, F\n");
printf("Make your next move.");
// puts a space where the player was after they moved
}//end while loop