I have this code below and I'm curious what would be stored in the memory if I entered
"Hi" then I'll press enter, will 'H' 'i' '\n' '\0' be stored in the memory
and if I enter
"Hello" then I'll press enter, will 'H' 'e' 'l' 'l' '\0' be stored in the memory then 'o' '\n' be in the buffer
and lastly, if I enter
"Hell" then I'll press enter, will 'H' 'e' 'l' 'l' '\0' be stored in the memory then '\n' be in the buffer
char str [5];
fgets(str, 5, stdin);
printf("%s", str);