C Program to Count number of words,digits,vowels using pointers

Write a program to count the number of words, lines and characters in a text

Program finding number of words, blank spaces, special symbols, digits, vowels using pointers

Count Number of Words using Pointer

Output :

Explanation of Program :

Now we are going to accept string using gets(). We are not using scanf() to accept string because scanf() will accept string only upto whitespace.

We are accepting string using character pointer. Now we are checking each character using character pointer and in each loop we are incrementing the character pointer.

Whenever first space is encountered then number of space counter is incremented by one.

In the if block we are checking that whether our pointer position is within the word or outside the word.