There are various ways to "input a target", such as:
1. File transfer.
2. Image from camera.
3. Verbal.
4. Joystick.
5. Touch screen.
6. Eye movements.
7. Electrical signals from the brain.
8. And, of course, keyboard.
And, you said nothing about "coordinates" being the target. This is to be an autonomous robot, correct? If so, then how can you expect us to conclude that "coordinates" will be it's goal. Why not:
1. Heat?
2. A color?
3. A gas or substance?
4. The end of a line it will follow?
5. A shape or even a face?
6. ???
Unless you are more specific, we can't help you.
And, it sounds like you want full instruction in the C language. I doubt if you will find that here. If you have a specific question or problem, I'm sure we'll be happy to give it a shot, but you'll need to, at least, go out and get the basics (like learning the C language and not expecting us to teach it to you -- or even for us to write the whole program for you).
At least provide some actual logic, as Syed requested