0
How does comparison operators work over strings?
4 odpowiedzi
+ 2
I suppose the two strings have to be exactly same, the same size and the same characters at the same index
+ 2
In short - they compare the chars in the strings by alphabetical (for letters) or ASCII table order.
+ 1
The comparison operator "==" compares the characters, their ASCII value as well and word length
So if you have three strings lets say;
a = "DIVYA"
b = "divya"
c = "Divya"
All these three on comparison produces the result "Not same". Because here the length of the word is same, word itself is same. But their ASCII values are different
0
Hi