CableLabs interview question

Programming question in C involving strings. Think LeetCode easy.