Hi, this works fine except that it only outputs ASCII code as far as the first word (so if its a sentence the user inputs then it will only go as far as the end of the first word).Code:#include<stdio.h> int main(){ char str[5000]; 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++]); return 0; }
What have I done wrong?