i want code for reading a binary file in C.
can anyone help?
use the fread() function.
Open the file in binary mode:
fp = fopen( filename, "rb" ); Read known structures and arrays with fread.
Read bytes with fgetc.
We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.