i am not understanding how the new line and null characters are used,can you tell me the specific task they are performing and also why are we only storing string till maxlen-1?
Our own readline function
the indexing of string is from 0 to len-1. So, at len-1 we used break statement.