C Program to convert string into ASCII values

C Program to convert string into ASCII values

 

#include
int main()
{
char str[100]; 
int i=0;
printf("Enter any string: \n"); 
scanf("%s",str);
printf("\nASCII values of each characters of given string: "); 
while(str[i])
printf("%d ",str[i++]);
return 0; 
}

No comments:

Post a Comment