I think you can use fopen to get the handle, and then use fileize to get the size and fseek to go to file size -50. Then it's just a five of 50 characters to get the last 50. I think it was done earlier if you look at the manual under fseek.
Here is the solution in fseek manual recording. Just change -1 to the fseek line to -50.
source share