Intel Corporation Interview Question

some string manipulations in c