what are the differences of string and cstring header files and how does the pre defined function of strcmp which is called string comparison works???? i know it gives 0 if string 1 = string 2 gives +ive and -ive if str1 is greater or less but it calculates that which one is greater????someone help??
Jump to Post
The strcmp() function compares the ASCII values of the characters one by one
It compares the numeric values of the characters. It's not safe to assume that the character set is ASCII. Granted, ASCII and Unicode (where ASCII is a subset) are pervasive, but but not universal.