#include <stdio.h>
#define MAX_STRING_LENGTH 1024
int main(){
char input_name_string[MAX_STRING_LENGTH+1],motive_string[MAX_STRING_LENGTH+1];
printf("What is your name?\n");
scanf("%1024s",input_name_string);
printf("your name is %s \n", input_name_string);
printf("What is your motive?\n");
scanf(" %1024s",motive_string);
printf("your motive is %s \n", motive_string);
return 0; }
So I wrote this simple program for a project in school to try and learn how scanf and printf work. For some reason when this runs it prints the first word in each string on one line then the second word on another line. I don't understand why this is happening? I don't have experience in C but the logic in my code seems correct? Any suggestions