I am working on a file parser and need to read in a null terminated string. It is easy to read fields of known length but I am having trouble grasping the idea of pulling a string of unknown length. Can someone please show me sample code to do this? How can I use fread to ensure I only read until the null character?