 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can count uppercase letter, lowercase letter, digits and spatial symbols available in a string by passing string into function in C programming. Before starting, you can note my information, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaygupta underscore tax school. You can download my programming app TagMess which is available on Google Play. Now I am going to implement solution of this problem. So first time including a header file that is stdio.h. Now I am going to declare a function whose written type is void, its name is count and it will receive an argument of type character array. So this statement is function declaration. Now I am defining main function. Inside main, I am declaring a character array. Now with the help of printf, I am going to display the message enter string on console. To read that string, I am using GATUS. So GATUS will read all the contents provided by the user and the content will be stored inside str. Now I am calling count function and I am passing str character array inside it. So this statement is function calling and at last I am writing the statement return 0. This is the definition of main. After defining main function, I have to define count function. So inside count, I have to write the logical part. So this definition will be known as function definition. Now I am declaring a variable i then c1 equals to 0, c2 equals to 0, c3 equals to 0 and c4 equals to 0. Now I am applying a loop which is initialized with 0. Then condition is str of i not equals to null and then i plus plus. Inside this for loop, I am applying first if condition which will check whether the string is containing uppercase letter or not. So this is the condition. So see this condition. If str of i greater than equals to 65 and str of i is less than equals to 90. So if the character which is available inside str character array is available within this range that is 65 to 90, then that character is uppercase letter. So I am counting c1 plus plus. In case if you forgot to write ask i values of capital letters, then you can replace this 65 with capital A enclosed in single quotes and capital Z enclosed in single quotes. So these capital A and capital Z will be automatically replaced by their ask i values that is 65 and 90. So you can use these character or you can use directly ask i quotes. So I am using sorry I am using ask i quotes. Now if this condition is false, then I have to check for lowercase letters. So for that purpose, I am using ask i quotes of lowercase range that is 97 to 122. So if character is available within this range, it is greater than equals to 97 or less than equals to 122, then I am counting c2 plus plus. Else if str of i greater than equals to 48 and str of i less than equals to 57, then that character will be a desert. So c3 plus plus and if character is not uppercase, not lowercase, not desert, then it will be automatically spatial symbol. So at last c4 plus plus. So this way I have implemented all the logical instructions with the help of if else inside for loop. After completion of this for loop, I can print values of c1, c2 and c3, c4 on console. So I am writing a printup statement for that purpose. So it will print upper equals to percent d slash n lower equals to percent d slash n deserts equals to percent d slash n spatial symbol equals to percent d then c1 comma c2 comma c3 comma c4. So this way I have implemented this count function which is counting quantities of uppercase letters, lowercase letters, digits and spatial symbols available in the string. So this is the complete implementation of this problem. Now I am going to execute this code. So I am entering ab34 capital AB hash dollar. So you can see the output. I have entered two uppercase letter, two lowercase letters, two digits and two spatial symbols. So the program is working properly. It is counting each character, whether it is uppercase, lowercase, digits or spatial symbol. So this way I have implemented solution of this problem in front of you. And remember that I have a parsed string into a function. So in the count function, I have calculated these values. I hope you have understood how I have implemented this program. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjaybukta underscore tech school. You can download my programming app tech immense which is available on Google Play. Thank you for watching this video.