Microsoft Interview Question

Write code to remove redundant spaces from a string in C