Intel Corporation interview question

some string manipulations in c