Q. Trim all the spaces in between the sentence.

#include<stdio.h>
#include<conio.h>
#include<string.h>

void main()
{
   char s[20];
   int len, i;
   clrscr();
   printf("Enter string");
   gets(s);
   len = strlen(s);
   for(i=0;i<len;i++)
   {
      if(s[i]!=' ')
      {
         printf("%c",s[i]);
      }
   }
   getch();
}