Dell Technologies interview question

code about comparison of two strings