Write an expression that evaluates to true if and only if the C-string s does not equal “end”.

3
Write an expression that evaluates to true if and only if the C-string s does not equal “end”.

LANGUAGE: C++

CHALLENGE:

Write an expression that evaluates to true if and only if the C-string s does not equal “end”.

SOLUTION:



(s!="end") ? 1 : 0

3 comments

Add comment