Quote:
This is what I get in lBytesRead in debugging
"lBytesRead 44 unsigned int"
So what has been read is 44 bytes out of a possible max of 50. So 44 bytes will be transferred to yoru buffer, and the remaining elements will not be affected in any way; their previous content - random according to your snippet - will remain as they were. This may give an impression of "random data at the end" and no terminating null '\0' will be appended. So if you print the array as a string assuming it is a valid null-terminated string, you will get random rubbish after your actual data.
In addition, Read is really intended for binary data, it takes no account of the file content. So check your file with a hex editor and make sure that it contains text, and only text: it if contains binary data, then you will get binary data, which may not be immediately printable! Use the debugger to compare the file content shown in the hex editor with the actual content of your array.