switch is a loop which is used for checking various conditions and print corresponding matter.
switch(a)//where a is that whose condition you have to check.
#include
main()
{
char a;
printf("enter a char.");
scanf("%c",&a);
switch(a)
{
case 'a':printf("vowel");break;
case 'e':printf("vowel");break;
case 'i':printf("vowel");break;
case 'o':printf("vowel");break;
case 'u':printf("vowel");break;
default:printf("consonent");
}
}
Copyright © 2026 eLLeNow.com All Rights Reserved.