 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can count uppercase, lowercase, digits, and special symbols and string using dynamic memory allocation. Before starting, you can note how you can search my YouTube channel. You can type my name, Sanjay Gupta in YouTube search bar. My channel will be available on first base. You can find out various programming related videos and playlist there. You can also download my programming app, Techimus, which is available on Google Play. Now here you can see I have implemented a code in front of you. Here, two header files, stdio and stdlib are included. Then inside main function, various variables are declared. Then a character pointer is declared. Then printer will display the message enter size of string on console. Then the entered size will be received through scanf, inside and variable. Then I have called malloc function, which will allocate dynamic memory through this and into size of cal. So desired size of memory will be allocated and that returned address will be typecasted into character pointer and that will be stored inside p pointer. Now to read the string from user, I have displayed the message enter string through printf. Then to clean the buffer memory, I am calling fflush function. So because I am reading strings after integer input, that's why I have to write this function before gattus. So after fflush function call, I can call gattus so that I can read strings successfully from the user. So the entered string will be stored inside p pointer. Now I am implementing a loop. So loop counter i is initialized with 0. Then here condition is asterisk p plus i not equals to null. So p is pointing to the base address of the allocated memory. I have added i into e and this p plus i is dereferenced with asterisk sign. If it is not equals to null, then only loop will be repeated, otherwise it will be terminated. And first f is checking whether asterisk p plus i, it means value of first location of string. Its ask i value is greater than equals to 65 or it is less than equals to 90. So if this condition is true, then the entered character is uppercase letter. So c1 will be incremented. Otherwise, second if condition will be checked. So here range is 97 to 122 which is for lower case. So if it is true, then c2 will be incremented. Otherwise, third if condition will be checked, here 48 to 57 is available. So if third if condition is true, then c3 will be incremented. If all the conditions are false, then c4 will be incremented that is for spatial symbols. After these condition checking, i will be incremented so that next location of that dynamic memory will be checked. So after completion of this loop, I can print the values of c1, c2, c3 and c4 on output screen. So here four printf statements are written and then free function will be deallocating the dynamically allocated memory with the help of p pointer. Now I am going to execute this code. So I am entering size of string as 10. So I am entering some values. So total nine characters are input through me because 10th location will be for null characters. So I have entered only nine characters. So you can see the output. Upper case are two, lower case two, digits two and spatial symbols are three. So first two inputs are digits, then two small letters, then two capital letters, then three spatial symbols. So if you compare the output with the entered string, then you will be finding out output is correct. So the program is working properly. This way I have implemented in front of you how you can count quantities of upper case, lower case, digits and spatial symbols in a string using dynamic memory allocation. If you want to watch more programming related videos, you can search my channel. Through my name Sanjay Gupta in YouTube, here various programming related videos and playlists are available. Thank you for watching this video.