 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can convert lowercase into uppercase and uppercase later into lowercase, which are available in a string by passing string into function using pointer. Before starting, you can note my information. You can connect with me by following these details which are available in front of you. You can search my YouTube channel by typing my name Sanjay Gupta in YouTube search bar. My channel will be available there. You can open it by clicking it. Here you will find various programming related playlist. So you can learn programming related tutorials which are available in my YouTube channel. Don't forget to subscribe by YouTube channel by clicking on this red button. 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 implement function declaration. So name of function is convert, its return type is void and its argument type is character pointer. So this statement is function declaration. Now I have to define main function. Inside main function, I am declaring a character array. Then printf statement which will display the message enter string. Now with the help of gattus, I am reading all the entered characters and those characters will be stored inside str. Now I am calling convert function in which I am passing str character array. So this statement is function called statement and then I am writing return 0. So this is the definition of main function. After main function, I have to implement definition of convert function. So this block will be known as function definition. Now inside this function definition, I have to use this p pointer which is receiving base address of this str. So base address will be stored inside p. Now through p, I can access each location of string in this convert function. So for that purpose, I am implementing y loop. Its condition is strp0 equals to null. So p is containing base address. It is de-referenced with the help of this str sign. So value will be available here. If it is not equals to null, then loop will be repeated. Otherwise, it will be terminated. Now I have to check whether the character is uppercase or not. So for that purpose, I am using strp greater than equals to 65 and strp less than equals to 90. So if this condition is true, it means character is uppercase letter. So I can write strp equals to strp plus 32. So if I add 32 in uppercase letter, then it will convert into lowercase letter. Then else if strp greater than equals to 97 and strp less than equals to 122. So this is the case for lowercase letter. So to convert lowercase letter into uppercase, I have to subtract 32 from it. So this way I have converted uppercase into lowercase and lowercase into uppercase. Now I can write p plus plus. So p will be pointing to the next location which is available in strl. So this way all the characters will be checked and uppercase will be converted into lowercase and lowercase will be converted into uppercase. Now after applying this operation, the str string will be modified automatically. So now in main function I can print converted string equals to %s and str. So here I am applying call by address because I have passed address of str into p pointer. So the changes which is done with the help of p pointer will be automatically reflected on str character array. So that's why I can print str in main function in this program. So now I am going to execute this code. So you can see I am entering my name. Three letters are in uppercase and three are in lowercase. Now you can see the output capital S is converted into smallest small a is converted into capital A, capital N into small n, small j into capital J, capital A into small a and small y into capital Y. So all lowercase letters are converted into uppercase and uppercase letters are converted into lowercase. So this way I have implemented complete logic in front of you. I hope I have understood the code well. If you want to watch more programming related videos, you can follow or subscribe my YouTube channel. You can download my programming app Takamis which is available on Google Play. Thank you for watching this video.