I made a simple program that remove all spaces from a string but i want is a program to remove space from the start of a string if there is and another program to remove space from the end of a string
Hope this make sense
Here is my c program that remove spaces from all the string giving
#include<stdio.h>
int main()
{
int i,j=0;
char str[50];
printf("Donnez une chaine: ");
gets(str);
for(i=0;str[i]!='\0';++i)
{
if(str[i]!=' ')
str[j++]=str[i];
}
str[j]='\0';
printf("\nSans Espace: %s",str);
return 0;
}