Skip to content
Sign in
Software Engineering

How does C++ handle lexicographical string comparison?

Tap an option to check the answer. You can also press A–D.

Explanation
In C++, strings are compared lexicographically using the , == operators. Comparison proceeds character by character from left to right. Each character is evaluated using its ASCII (or Unicode) value.