How to compare two string lexicographically manually?
Answers
Answered by
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
Similar questions
Computer Science,
7 months ago
Computer Science,
7 months ago
Hindi,
7 months ago
Biology,
1 year ago
Biology,
1 year ago
Math,
1 year ago
English,
1 year ago