I'm creating a sorting program with grade as the condition and want to know how does the strcmp() compare 2 strings with different length.For example if one of them is "A" and the other is "AB" why does the "A" is less than "AB" but if the first string is "B", the second string (which is "AB") is less than "B". How do i know the value of each string and how do i count it ?