C program to count number of vowels and consonants in a string using pointer

By | 01.12.2016

Count number of vowels and consonants


Write a C program to count number of vowels and consonants in a string using pointer. Here’s simple program to count number of vowels and consonants in a string using pointer in C Programming Language.


What are Pointers?


A pointer is a variable whose value is the address of another variable, i.e., direct address of the memory location. Like any variable or constant, you must declare a pointer before using it to store any variable address.

The general form of a pointer variable declaration is

  • type *var-name;

Here, type is the pointer’s base type; it must be a valid C data type and var-name is the name of the pointer variable.

The asterisk * used to declare a pointer is the same asterisk used for multiplication. However, in this statement the asterisk is being used to designate a variable as a pointer.

The unary or monadic operator & gives the “address of a variable’”.

The indirection or dereference operator * gives the “contents of an object pointed to by a pointer”.


Below is the source code for C program to count number of vowels and consonants in a string using pointer which is successfully compiled and run on Windows System to produce desired output as shown below :


SOURCE CODE : :



Output : :



Above is the source code for C program to count number of vowels and consonants in a string using pointer which is successfully compiled and run on Windows System.The Output of the program is shown above .

If you found any error or any queries related to the above program or any questions or reviews , you wanna to ask from us ,you may Contact Us through our contact Page or you can also comment below in the comment section.We will try our best to reach up to you in short interval.


Thanks for reading the post….

3
Leave a Reply

avatar
1 Comment threads
2 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
0 Comment authors
Codez Clubcodezclub  Post authorJesus Eduardo Garcia Rios Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
Jesus Eduardo Garcia Rios
Guest
Jesus Eduardo Garcia Rios

line 9 produces a problem

codezclub  Post author
Guest
codezclub Post author

Thanks for telling error, Since we have corrected the error at line 9 ,you must check again and feel free to ask any question if you found any error again…….Thanks for visiting

Codez Club
Guest
Codez Club

Thanks for telling error, Since we have corrected the error at line 9 ,you must check again and feel free to ask any question if you found any error again…….Thanks for visiting