Hej,
I might be wrong, because I don't code C from the computer to perform this type of task but ... your C program is not handling the event of receiving data from the port, and therefore it is impossible for you to capture the data that Arduino sends.
The Arduino program looks ok, it is a "relay server" that sends back whatever it gets at the input. It is the program for the computer that is not finished.
/David