answersLogoWhite

0

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 <= 'z') {

/* If the character is a consonant, this code will be executed. */

}

return 0;

}

/* end code */

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a program to enter a character and it will tell the character etered?

{char a;...cout > a;cout


How you would you write a program in turbo c7 if letter is vowel or consonant?

You can write a program in Turbo C7 that takes a character as input and checks whether it is a vowel or a consonant by using a simple if-else statement. You can compare the input character with a list of vowels (a, e, i, o, u) and if it matches any of these, then it's a vowel; otherwise, it's a consonant. Print the result accordingly.


How do you write a c program to read two character from keyboard nd sot them in alphabetical order?

Every character in C++ is basically belongs to short. You can convert entered characters to short, compare their values and according to the values sort them in alphabetical order.


What is the output displayed by the following program when the data entered are 5 and 7?

Impossible to say without seeing the program's source.


Is program a short or long vowel sound?

In the word &quot;program,&quot; the letter &quot;o&quot; is a short vowel sound. A short vowel sound is typically the sound that the vowel makes in the word when it is followed by a consonant. In this case, the letter &quot;o&quot; is followed by the consonant &quot;g,&quot; so it makes a short vowel sound.


What show does Teto and Miku come from?

The character Teto comes from the program known as UTAU. The character Miku comes from the program known as Vocaloid.


What kind of character is Bubbles on an HBO program?

Bubbles is a prevalent character in the HBO program The Wire. His character is a recovering Heroin addict. His real name is actually Reginald Cousins and has a son that lives with his mother.


How is memory allocated in c program for a character data type?

One byte for every character.


Which cartoon character is the face of the Middle School FFA program at the National FFA?

Garfield is the character


Program to display multiplication of two matrix?

The matrix multiplication in c language : c program is used to multiply matrices with two dimensional array. This program multiplies two matrices which will be entered by the user.


How net write a program to identify whether a character entered by a user is a vowel or constant?

in semi-pseudo code: get character //convert uppercase letter to lowercase letter if( 65 &lt;= (int) character &lt;= 90) character ^ 32 //check that a letter was given if( 97 &lt;= (int) character &lt;= 122) { switch(character) { case a: case e: case i: case o: case u: output "vowel" break; case y: output "consonant and/or vowel" break; default: output "consonant" break; } } else output "not a letter"


What is a bug in a computer program?

A bug in a computer program is when something doesn't work in the computer program. Cause could be: Something was entered in the programming correctly. Ex. you want to click on exit button but it does something else.