 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can convert lowercase letter into uppercase and uppercase letter into lowercase by passing string into function. 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 TechMS 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 stdi.h. Now I am declaring a function void convert and this function will be receiving an argument of type character array. So this statement is function declaration. Now I am going to define main function inside main function. First time declaring a character array. Now with the help of printf, I am going to disclose a message. Enter string on console. To receive that string, I am using gattus. So gattus function will receive the entered string and that string will be stored inside str. Now I am calling convert function and I am passing str string into it. This statement is function calling and then return 0. Now I am defining convert function definition. This block will be known as function definition. Inside this function, I am implementing a for loop which is initialized with 0. Its condition is str of i not equals to null and then i++. Inside this loop, I have to check whether the entered character is uppercase or lowercase. So first time checking for uppercase. So if str of i is greater than equals to 65 and str of i is less than equals to 90, then the character is uppercase letter. So to convert uppercase letter into lowercase, I have to subtract it with minus 32. So if uppercase ascii value is subtract, sorry, I have to add. If I want to convert uppercase letter into lowercase, so I have to add 32 in ascii value of uppercase character so that it will be converted into lowercase. So if we compare ascii value of capital A with small a. So capital A ascii code is 65 and lowercase a ascii code is 97. So if we add 65 plus 32, so answer will become 97. So it is also true with all uppercase and lowercase letters. So if I add 32 in any of the uppercase letter, then it will be converted into corresponding lowercase letter. Now else if, now I am checking whether the entered letter is lowercase or not. So for that purpose, I am using this condition. So if this condition is true, it means the entered character is lowercase. So now I am going to subtract str of i with minus 32. So if you want to convert lowercase letter into uppercase, then you have to subtract with 32. So ascii value of lowercase is subtracted by 32. After completion of this loop, each uppercase letter will be converted into lowercase and lowercase letters will be converted into uppercase. Now I can print the converted string. So this is the complete implementation of the program. Now I am going to execute this code. So I am entering different case letters. So s, n, n, a, these are uppercase and a, j, and y, these are lowercase letters. You can see the output s and a are converted into lowercase, a, j, y are converted into uppercase. So you can see program is working properly. It is converting all uppercase letters into lowercase and all lowercase letters are converted into uppercase letters. And I have passed string into function for calculation. So I hope you have understood how we can implement this logic in C programming. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel through the URL youtube.com slash sanjay gupta underscore tech school. You can download my programming app tech image, which is available on Google Play. Thank you for watching this video.