I was asked to do a work in C when I\'m supposed to read from input until there\'s a space and then until the user presses enter. If I do this:
scanf(\"%2000
//increase char array size if u want take more no. of characters.
#include
int main()
{
char s[10],s1[10];
scanf("\n");//imp for below statement to work
scanf("%[^\n]%c",s);//to take input till the you click enter
scanf("%s",s1);//to take input till a space
printf("%s",s);
printf("%s",s1);
return 0;
}