Computer Science, asked by TbiaSamishta, 1 year ago

How the comparison of two strings is done? Write a program to compare two strings entered through keyboard by the user.

Answers

Answered by Secondman
0

"The comparison is done using strcomp() function which checks both strings from left to right and character by character.

It returns 0 if compared strings are exactly identical, negative integer if the ASCII value of first unmatched value is lesser than second value, positive integer if the value of  ASCII of the first unmatched value is greater than second value.

Img 37_11"

Attachments:
Similar questions