So I want to check if someone enters: \\n (\'\\\' and then \'n\') from the keyboard to a string, so I\'m doing something like this:
\\n
\'\\\'
\'n\'
You have to escape \ by doubling it:
\
if ( ((str[i] == '\\') && (str[i+1] == 'n')) ){ }