I am not getting string copied.
i wanted to copy only the first word.
but some erroneous output
[code]
#include<stdio.h>
#include<string.h>
void main()
{
int n,i;
char s[100],s2[100];
printf("Enter a String: \n");
gets(s);
while(s[0]==32)
strcpy(s,s+1);
n=strlen(s);
while(s[n-1]==32)
{
strcpy(s+n-1,s+n);
n--;
}
n=strlen(s);
for(i=0;i<n;i++)
{
if(s[i]==32)
break;
}
memmove(s2,s,i+1);
puts(s);
puts(s2);
}