C Program to convert string into ASCII values in c programming language


 #include<stdio.h>

int main(){

    char str[100];
    int i=0;

    printf("Enter any string: ");
    scanf("%s",str);

    printf("ASCII values of every characters of  string: ");
    while(str[i])
         printf("%d ",str[i++]);


    return 0;
}
Enter any string:ankit c guru
ASCII values of every characters of string: 97 110 107 105 116

Comments

Popular posts from this blog