 Hello friends, I am Sanjay Gupta. In this video, I am going to demonstrate you how you can print ASCII values of characters of string using pointers. 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 Techimus which is available on Google Play. Now I am going to show you the code with the help of C programming so that you can print ASCII values of each character available in the string using pointer. So first I am including a header file that is stdio.h. Now inside main function, I am declaring an array care str sizes 10 and a pointer p. Now with the help of printf, I am going to display the message enter string on console. The entered string will be received through gatters and will be assigned into str array. Now I want to process this str through pointer. So for that purpose, I am writing this statement p equals to str. So here base address of str is assigned into p pointer. So now through p, I can access all the elements which are available inside str character array. So for that purpose, I am applying while loop. So this while loop will check whether string character is null or not. So if it is null, then this loop will be terminated. Otherwise this loop will repeat till null occurs. So now I have to print the ASCII values. So for that purpose, I am implementing printf then %d and asterisk p. So this asterisk p will print each character on console. But here you can see I have used %d. So %d is used to print ASCII values of characters. So whenever we want to print ASCII value of a character, then you have to use %d as a format specifier and then p++. Now after completion of this loop, I am writing return 0. So this way all the contents will be displayed on console and the contents will be displayed in form of ASCII values. So each characters ASCII value will be displayed on console. Now I am going to execute this code. So I am entering send as input. You can see the ASCII values of each character is displayed on console. Now if you want to print ASCII values along with the characters. So you can write this like this. %c equals to %d and asterisk p is written twice. So first asterisk p will print character format and then second asterisk p will print its corresponding ASCII value. So again I am executing this code. I have entered my name Sanjay and I am going to press enter key so that you can see the output. So you can see each character is displayed with its ASCII values. So as 83, small a97, n110, small v106 and so on. So this way ASCII value of each character is displayed in front of you and I have implemented this process with the help of pointer. So through pointer you can print characters as well as their ASCII values which are available in a string. I hope you have understood how I have implemented this logic in front of you. If you want to watch more programming related videos 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. Thank you for watching this video.