I've been doing abit of reading through the Linux programmer's manual looking up various functions and trying to get a deeper understanding of what they are/how they work.
Looking at fgets()
I read "A '\0' is stored after the last character in the buffer .
I've read through What does \0 stand for? and have a pretty solid understanding of what \0
symbolizes (a null character right ?). But what I'm struggling to grasp is its relevance to fgets()
, I don't really understand why it "needs" to end with a null character.