I'm creating an algorithm in C to train myself and I need to get a text (large and with spaces) that the user types at the same prompt. I've tried using scanf, gets and fgets and none is catching what comes after the space, just the text until you get the first space. How can I get all the text and save in an array of char only?
char texto[3000];
fgets(texto, 3000, stdin);
My last attempt was this one, but it only takes the first word before space.
I can not get enter (line break) because there are more actions to take after getting the first text