i had been working with one program where it eliminates one or more balnk space in a string to single blank space. i have written a program which compiles and run success. and below is my code, can any one tell me how can i improve this program to work better and minimise the code or what i have writtin is more efficient. any comment would be appriciated.
/* program to replace a string of one or more blanks by a single blank */
printf("Enter the value for the string\n");
fgets(str,sizeof str, stdin);
if(isspace(str[i]) && count==0)