Contact Learn C
Copy Program Share Program

Program 351 : Print ASCII Values of letters in string

Program 351 : Print ASCII Values of letters in string
 
#include<stdio.h>
#include<string.h>
main()
{
 int i;
 char str[100];
 printf("Enter a string to find ascii values of each letter\n");
 gets(str);
 for(i=0;i<strlen(str);i++)
 {
  printf("%c----->%d\n",str[i],str[i]);
 }
}
Explanation:
//Coming Soon

Output: 
Print ASCII Values of letters in string

 

Download App and Learn when ever you want

Get it on PlayStore
Get it on Amazon App Store
Get it on Aptoide