I'm trying to read very long strings (max 4096 characters) from a file but struggling.

Using fgets to no avail. Tried a number of options indicated on net using malloc but once char count goes > 256 all seems to go pear shaped. Using bloodshed compiler with a DOS based application for simplicity.

Long time since I programmed C (10yrs) but am getting really frustrated.
Kind regards,