Is does work: it just probably doesn't do what you expect it to.
When you use
scanf
for a number, it waits until the user enters the number and presses ENTER, then parses the input and returns the numeric value - but the ENTER character is "left on the shelf" so when you subsequently use
scanf
for the individual characters, the first one returned is the ENTER character: '\n'
Then the remaining characters are read, so it looks like you end up one short...
Try this and see if it helps:
scanf("%d\n", &n);