look at the code given below
#include <stdio.h>
int main()
{
char str[20];
printf("Enter a string : ");
scanf("%s", str);
printf("String : %s", str);
return 0;
}
output will be,
Enter a string : Hello world
String : Hello
my question is why it take only first word as input?