i want to retrieve 6 lines of text, from a user. I've tried the following:
char userInput[160];
fgets(userInput, 160, stdin);
>some text inputted1
fgets(userInput, 160, stdin);
>some text inputted2
fgets(userInput, 160, stdin);
>some text inputted3
fgets(userInput, 160, stdin);
>some text inputted4
fgets(userInput, 160, stdin);
>some text inputted5
fgets(userInput, 160, stdin);
>some text inputted6
for some reason when i use printf("%s", userInput); it prints the latest inputted text and not the previously entered ones