 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how to count how many vowel and consonants are available in string by passing string into function using pointer. Before starting, you can note my information, you can follow or subscribe my youtube channel through the url youtube.com slash sanjaygupta underscore tech school. You can download my programming app Techimage which is available on google play. Now I am going to implement solution of this problem with the help of c programming. So first time including a header file that is stdio.h. Now I am implementing declaration of function whose name is count, its return type is void and its argument type is character pointer. So this statement is function declaration. Now I am going to define main function. Inside main I am declaring a character array. Now through printf I am going to display the message enter string on console and getters function will read the entered character from the console and the characters will be stored inside str string. Now I have to call count function and I am passing str in it. So this statement is function calling statement and after that I am writing return zero. So this is the definition of main function. Now I have to define definition of count function. So for that purpose I have implemented this block. This block will be known as function definition. Now inside this function definition I am going to declare two variables c1, c2 and both are initialized with zero. So c1 will be counting number of walls and c2 will be counting number of consonants. Now I am implementing while loop. Its condition is strp not equals to null. So p is containing base address of string because at calling time I have passed name of string. So here base address of string will be passed and that will be received inside p pointer. Now I have to de-reference this p pointer using strp. So if it is containing any character then this condition will be true and if this strp will be containing null then this loop will be terminated. So inside this loop I have to check whether the address which is stored inside the pointer is containing any wall or it is containing any consonant. So for that purpose I am using if statement strp double equals to a then or strp double equals to e then or strp double equals to i then or strp double equals to o then or strp double equals to u. So this way I have implemented all the cases of wall for comparing whether string is containing wall or not. But you can see I have compared only uppercase letters. So now I have to write these five conditions for lowercase also. So for that purpose I have pasted these conditions and now I am converting all the uppercase letters into lowercase letters so that both uppercase and lowercase letters are compared. So this is the complete condition for checking walls. If this condition is true then I can count c1 plus plus and if this condition is false then I can increase c2 by 1 and at last I have to increase p because I have to move to the next locations of string. So this way I have implemented the complete y loop in front of you. So if this if condition which is available at line number 18 is true then c1 will be incremented by 1 otherwise c2 will be incremented by 1 and in all the cases p will be incremented so that next locations will be identified whether they are containing wall or consonants. Now after completion of this loop I can print the counted result on console. So for that purpose I am using a printf which will display values of c1 and c2 variables on console. So this way I have implemented the complete definition of count function and this is the complete implementation of program. Now I am going to execute this code. So here I am entering my name in mixed letters so you can see the output. Walls are 2 and consonants are 4. So in my name a comes 2 times so this is counting as a wall and s and j and y these are consonants. So consonant quantity is 4. So this way I have checked whether sorry this way I have checked how many letters are walls and how many letters are consonants in the string and I have passed string into function with the help of pointer. So I hope you have understood how I have implemented this logic in front of you with the help of c programming. If you want to watch more programming related videos you can follow or subscribe my youtube channel to the url youtube.com slash sanjay gupta underscore you can download my app tech image which is available on google play. Thank you for watching this video.