I am making a program in C language which prints the ASCII value of the string/text including spaces. The program works fine and give exact ASCII values of string including spaces but the problem is that it also prints '10' at the end of all ASCII values.
This is my code :
printf("Enter a string: ");
printf("String is: %s\n",str);
printf("ASCII value in Decimal is: ");
for(i=0; str[i]!='\0'; i++)
When you read a string with
fgets the enter you press is included in the string( man page ). ASCII code for