-2
I am creating a C algorithm to train even and need to pick a text (large and with spaces) that the user type at the same prompt. I tried using scanf, gets and fgets and none is picking up what comes after space, just the text until you get into the first space. How I can grab all the text and save in a char array only ?
char texto[3000];
fgets(texto, 3000, stdin);
My last attempt was this, but it only takes the first word before space.
Note that you cannot get enter (line break) because there are more actions to be done after picking up the first text
I tested here and picked up the words after the space
– gato