I recently saw an usage of '\n' as format specifier for scanf() function in C.
More precisely, it was:
scanf("%[^\n]\n", arr);
And I'm just wondering how the scanf will deal with that... I'm talking about the second '\n'.
And the next question is, why won't it work for Windows text files as input? I'm pretty sure the cause is different line endings in Windows and Unix, but I don't know exactly how it causes this and I'm wondering.
Thx in advance and enjoy your day.