Physics, asked by deepakkumar99361, 1 year ago

How to compare two string lexicographically manually?

Answers

Answered by Anonymous
1

Hey..!

You can use strcmp(str1, str2) to compare two strings present in string.h header file. It returns -1 if first string is lexicographically smaller than second string, returns 0 if both string are lexicographically equal else returns 1 if first string is lexicographical greater than second string.

Thanks.. :)


einstien66: yo
PhiloLove: hey
PhiloLove: @ujjawal @smokes
PhiloLove: plz stay away
PhiloLove: from him
Similar questions