Write an expression that evaluates to true if the value of the C-string s1 is greater than the value of C-string s2 .

Write an expression that evaluates to true if the value  of the C-string s1 is greater than the value of C-string s2 .

LANGUAGE: C++

CHALLENGE:

Write an expression that evaluates to true if the value of the C-string s1 is greater than the value of C-string s2.

SOLUTION:



(strcmp(s1,s2) > 0) ? 1 : 0

Add comment