I've been away for months from C and i came back to it lately with lots of misconceptions so bear with me.
correct me if im wrong :
- input functions like scanf() buffers whatever you type then once you hit <enter> it saves it to the variable\array you've chosen.
now my questions :
1. output functions buffer output before displaying it right? when and why?
2. How is it possible that a function leaves some characters in the buffer? and do different functions\streams use the same buffer?
3. why does 'fgets()' terminate when 'scanf()' precede it , because 'scanf()' leaves '\n' in the stream or the buffer?
4. how do 'fgets()' know that the '\n' is in the buffer\stream? does it like search it before you have the chance to enter anything or what?