Back To C User Defined Functions Index
//program to create a function that checks whether character passed to it as argument is vowel or not using if else statement #include
#include
void checkvowel(char); void checkvowel(char ch) { if((ch=='a') || (ch=='e') || (ch=='i') || (ch=='o') || (ch=='u')) { printf("you enetred a vowel"); } else { printf("enter a vowel (a,e,i,o,u)"); } } void main() { char ch; clrscr(); printf("enter a character"); scanf("%c",&ch); checkvowel(ch); getch(); }