hi all...
i want code for reading a binary file in C.
can anyone help?

Recommended Answers

All 2 Replies

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.