stdio.h is part of standard C.
conio.h is as obsolete as DOS (before your time - it was microsoft's 16-bit command line OS from the 1980's).
At least you know now that your teacher isn't as up to date as you previously thought.
Watch out for these other tell tale signs that they really don't know what they're talking about.
- using fflush(stdin) to clean up the input buffer.
- using gets(buffer) to read a line of input.
> And that is an interesting way to write the switch statement
C for the most part doesn't care about white space or newlines, so long as the result is unambiguous.
So
Code:
switch(ch)
{
case 'a':
case 'e':
case 'i':
case 'o':
case 'u':
printf("Vowel.");
break;
default:
printf("Consonant.");
break;
}
and
Code:
switch(ch) {
case 'a': case 'e': case 'i': case 'o': case 'u': printf("Vowel."); break;
default: printf("Consonant."); break;
}
are equivalent.