@k0der replace scanf("%c", &ch) with this: scanf("%*[ \n\t]%c",&ch); this will skip blanks, newlines n tabs. in scanf above after '[' there is...
Separate names with a comma.