In languages I know, %s is for null-terminated strings. Notation is a char, not a null-terminated string. Try %c instead of %s when printing chars (and drop the &)?
Edit: that is almost certainly the problem. In the "50" example, it's printing "N2", because 50 happens to be the ASCII code for the character "2". In the "8" example, it appears to print nothing because 8 is the ASCII code for backspace (so, it prints the "N", and then moves the cursor back one space; when it prints the ^, the N gets overwritten).
I bet if you choose 65, you'll see "NA", "NA^2", and so on.
Under the hood, your printf is printing whatever it finds in memory starting from the address you gave it, until it finds a byte with value "0". It just so happens that MAX_COLUMNS is located there, so the bytes that make up MAX_COLUMNS get printed as if they were part of the string.
In languages I know, %s is for null-terminated strings. Notation is a char, not a null-terminated string. Try %c instead of %s when printing chars (and drop the &)?
Edit: that is almost certainly the problem. In the "50" example, it's printing "N2", because 50 happens to be the ASCII code for the character "2". In the "8" example, it appears to print nothing because 8 is the ASCII code for backspace (so, it prints the "N", and then moves the cursor back one space; when it prints the ^, the N gets overwritten).
I bet if you choose 65, you'll see "NA", "NA^2", and so on.
Under the hood, your printf is printing whatever it finds in memory starting from the address you gave it, until it finds a byte with value "0". It just so happens that MAX_COLUMNS is located there, so the bytes that make up MAX_COLUMNS get printed as if they were part of the string.