In this sense, “less than” for strings means lexicographic (alphabetical) order.
So cat
is less than dog
because cat
is alphabetically before dog
.
Lexicographic order is, in some sense, an extension of alphabetical order to all ASCII (and UNICODE) characters.
More Related Contents:
- strcmp refuses to work [closed]
- Why do I get a segmentation fault with strcmp [closed]
- How do I properly compare strings in C?
- strcmp on a line read with fgets
- Why does strcmp() return 0 when its inputs are equal?
- What does strcmp() exactly return in C?
- Implementation of strcmp
- CS50 Caesar – ASCII letters and Output format
- How to disable GCC warnings for a few lines of code
- What is the use of fflush(stdin) in c programming? [closed]
- stat() error ‘No such file or directory’ when file name is returned by readdir()
- Are string literals const?
- Is there any way to compute the width of an integer type at compile-time?
- Are compilers allowed to eliminate infinite loops?
- Generate a random number within range? [duplicate]
- Which part of the C standard allows this code to compile?
- Is modification of string literals undefined behaviour according to the C89 standard?
- How to prove that the C statement -x, ~x+1, and ~(x-1) yield the same results?
- C: Expand Macro With Token Pasting
- If free() knows the length of my array, why can’t I ask for it in my own code?
- C cast void pointer to function pointer
- C variable declarations after function heading in definition [duplicate]
- How can I access a graphics card’s output directly?
- execute binary machine code from C
- Dropping root privileges
- Difference between *ptr[10] and (*ptr)[10]
- How are multiple prior declarations resolved for a new declaration with extern?
- How are we able to access the pointer after deallocating the memory?
- how to detect a file is opened or not in c
- How to write/read to FLASH on STM32F4, Cortex M4