Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- int main()
- {
- int i,j=0;
- char str[100];
- printf("Please Enter a String :\n");
- gets(str);
- for(i=0;str[i]!='\0';++i)]
- {
- if(str[i]!=' ')
- str[j++]=str[i];
- }
- str[j]='\0';
- printf("\nString After Removing Spaces:\n\n%s\n",str);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement