Aside from suggestions for printing the \n character after your array (which is correct), you should also be careful with your scanf , which is expecting a yes / no response. Muggen was the first to notice this (see His answer).
You used %c specified in scanf . The %c scanf in scanf does not skip spaces, which means that this scanf will read all the spaces left in the input buffer after entering your array. You get to the "Enter" key after entering an array that places a newline character in the input buffer. After that, scanf("%c", &check) will immediately read this pending newline character instead of waiting for the input to be yes or no. This is another reason your code doesn't print anything.
To fix your scanf , you must force it to skip all whitespace before reading the actual answer. You can do this with scanf(" %c", &check) . Note the extra space in front of %c . The space character in the scanf format string makes it skip all contiguous spaces, starting at the current reading position. The newline is white, so this scanf will be ignored.
source share