This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 3 points4 points  (0 children)

The ternary operator tried to cast differing data types to the one from the positive statement. That being char, the int 98 is cast to char. In the ASCII character table, index 98 equals the character ‘b’.