" \n"[i==n]
takes the expression i==n
, which evaluates to either 0 or 1, and uses it as an index into the array " \n"
, obtaining either ' '
or '\n'
.
"YES\0N0"+condition * 4
takes the array "YES\0N0"
, which 'decays' to a pointer to its first element when used in most expressions, including this one, and adds condition * 4
to this pointer. If condition
is 1, that yields a pointer to the 'N'
at the beginning of "N0"
.