A shapefile stores nontopological geometry and attribute information for the spatial features in a data set. The geometry for a feature is stored as a shape comprising a set of vector coordinates.
This program reads three partsof a shapefile(.shp, .shx, .dbf) from start to end byte-by-byte, and prints all information to a .txt file.
I also shared with you some output examples.
Technical description of shapefile: https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf