answersLogoWhite

0


Best Answer
  1. #include
  2. main()
  3. {
  4. char ch;
  5. clrscr();
  6. pritnf("\nEnter any character:");
  7. fflush(stdin);
  8. scanf("%c",&ch);
  9. if (ch 'U' ch = 'u')
  10. {
  11. printf("\n The entered character %c is Vowel.\n", ch);
  12. }
  13. else
  14. {
  15. printf("\nThe entered character %c is not Vowel.\n",ch);
  16. }
  17. }
User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

#include <stdio.h>

#include<conio.h>

void main()

{

char ch;

clrscr();

printf("\nEnter any character: ");

scanf("%c", &ch);

switch (ch)

{

case 'a':

case 'A':

printf("\n\n%c is a vowel", ch);

break;

case 'e':

case 'E':

printf("\n\n%c is a vowel", ch);

break;

case 'i':

case 'I':

printf("\n\n%c is a vowel", ch);

break;

case 'o':

case 'O':

printf("\n\n%c is a vowel", ch);

break;

case 'u':

case 'U':

printf("\n\n%c is a vowel", ch);

break;

default:

printf("\n\n%c is not a vowel", ch);

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

12y ago

#include<conio.h>

#include<stdio.h>

main()

{

char ch;

printf("\n Enter any character:- ");

scanf("%c",&ch);

switch(ch)

{

case 'a':

case 'A':

case 'e':

case 'E':

case 'i':

case 'I':

case 'o':

case 'O':

case 'u':

case 'U':

printf("\n The character is vowel!");

break;

default :

printf("\n The chracter is not a Vowel!");

}

getch();

}

This answer is:
User Avatar

User Avatar

Wiki User

11y ago

The simplest and sample code could be as follows:

#include <stdio.h>

void main()

{

char ch;

printf("Enter the char:\n");

scanf("%c", &ch);

switch(ch)

{

case 'a':

case 'A':

case 'e':

case 'E':

case 'i':

case 'I':

case 'o':

case 'O':

case 'u':

case 'U':

printf("The entered character is vowel");

break;

default:

printf("The entered character is not a vowel");

break;

}

}

This answer is:
User Avatar

User Avatar

Wiki User

8y ago

#include<stdio.h>

bool is_vowel (const char c) {

switch (tolower (c)) {

case 'a':

case 'e':

case 'i':

case 'o':

case 'u': return true;

}

return false;

}

int main (void) {

char ch;

printf ("Enter a character: ");

scanf ("%c", ch);

if (is_vowel (ch))

printf ("The character %c is a vowel\n", ch);

else

printf ("The character %c is not a vowel\n", ch);

return 0;

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the C program to check whether a given character is vowel or not using switch case?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a program By using if else statement to read a number and check whether it is positive or negative?

write a c++program by using if statement to read a number and check whether it is positive or negative


What is a Desk check trace table?

Going through a program on paper to check whether it has errors.


Write a program to adentify whether a character entered by a user is a vowel or a consonant?

You can check the value of a character by using if statements.Also, note that this code does not check for capital letters./* code */#include int main(){char c;c = getc(stdin);if (c 'o') {/* If the character is a vowel, this code will be executed. */} else if (c >= 'a' && c


What are the explanation steps for palindrome program?

If you want to check whether a string is a palindrome, you can reverse the string (for example, the Java class StringBuffer has a reverse() method), and then compare whether the two strings - the original string and the reverted string - are equal. Alternately, you could write a loop that checks whether the first character of the string is equal to the last one, the second is equal to the second-last one, etc.; that is, you have a counter variable (in a "for" loop) that goes from zero to length - 1 (call it "i"), and compare character #i with character #(length-i-1) inside the loop.


How do you do a username and password login program using C-language?

For a username, just get the username from the standard input using scanf and check whether this username matches with the username stored. If it doesn't match, then the username is wrong.For a password, get each character using getch(). Print a * for each character obtained. Now check this password with the stored password. If these don't match, then the password is wrong.


Can you write a C program to check whether a string is an IP address or not?

Use the Exception class and type converters.


What is the program that performs system check when computer is first turned on?

The BIOS (Basic Input Output System) runs the initial disc check and starts the required programs when you switch it on.


Write a program that stores vowels in an array When you program is given a character it should indicate whether the character is vowel or not?

That's easy to do!This script will get the POST data from an HTML form and check if it is a vowel.


Lab manual in mca 1st sem from ignou?

write a program in C to check whether a given number is apalindrome or not


Write a c program to check whether a string follows English capitalization rules?

Active Time spent online


Suppose an electric motor with a controller is not working. What is the sequence of testing you will do in your troubleshooting?

1st check the power supply switch whether on or off then Check the all wiring connections may be wire disconnected or there is any loose connection(OFF the switch). smell the component whether it is heated or not and touch to experiance the heat(OFF the switch). replace the controller/motor with new one to detect fault present in which part.


Could you write a assembly language program in tasm To check whether a given number present in a sequence of given memory location containing the string to be checked in 8086?

8086 assembly language program to check wether given number is perfect or not