Why scanf doesn\'t work when I type \"Enter\" in the code below?
#include #include #include int main(int a
Because of scanf() wait char-string, separated by whitespaces, enters, etc. So, it just ignores ENTERs, and waiting for "real non-empty string". If you want to get empty string too, you need to use
fgets(msg, 100, stdin);