In this program integer type variables declare (vowel,Consonent) and pointer of file (FILE *fp1;). And control statements also used if the given situation is not true than the arguments will be insufficient else it will go on. Nested if statements also come in use the next move is to if file pointer is null then source will not open. While condition tells the (ch!EOF) not equal to End of File. If condition used with the OR (!!) operator. This Will checks out the given characters match the condition. Then it’s Vowel else consonant. And in the last move it will be counted as result.
Here in the program user has to count the Vowel with the use of file handling Concept.
- Checks out The Given Arguments.
- Using the Control Statements.
- Applying Required Statements.
- Display Result on Screen.
The C program is successfully compiled. The program output is also shown below.
void main(int argc,char *argv)
printf("Source can't be opened");
printf("\n Number of vowels are = %d",vowel);