String differrence in asccii

how to do the question

Please provide me with the sample input and output so that i can explain you the approach.