Write an expression that evaluates to true if the value of C-string lastName is greater than the C-string “Dexter”.

Write an expression that evaluates to true if the value of C-string lastName is greater than the C-string “Dexter”.

LANGUAGE: C++

CHALLENGE:

Write an expression that evaluates to true if the value of C-string lastName is greater than the C-string “Dexter”.

SOLUTION:



(strcmp(lastName, "Dexter") > 0) ? 1 : 0

Add comment