C program to convert a string to ASCII.
source code
#include<stdio.h>
int main()
{
char str[100];
int i=0;
printf("Enter any string: ");
scanf("%s",str);
printf("ASCII values of each characters of given string: ");
while(str[i])
printf("%d ",str[i++]);
getch();
return 0;
}
Comments
Post a Comment