char str[20];
scanf("%s", str);
printf("%s", str);
Input 1 --> Hi prints -->Hi(Even though I added some spaces before 'Hi')
Input 2 -->Hello World prints -->Hello(scanf terminates reading char after it encounters any whitespaces but in Input 1 it didnt act as a terminating point but was just truncated.)