I did a test with buffer.getline(*char, count, termchar) utilizing an ifstream buffer.
I always assumed that a null pointer was written after the last character of the established array only.
I was doing a test to check for this character and found it in every array position past my data.
For example...
char array[25];
cin.getline(array, 24, '\n'); // only I was using a different char buffer
....
I found that if I typed (or read in) 1234 that array[3]=='4' and array[4]=='\0' ... and that was to be expected.
But then I found array[5] through array[24] where also equal to '\0'. (I only picked a couple to look at, so there may be an error in my findings)
This is something that I didn't know. Do the test for yourself if you do not know the reasons for this already. Why do you think that it would be such? What is the point of overwriting the entire array with null values after the data? What is your opinion on this? Am I wrong?