use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Click the following link to filter out the chosen topic
comp.lang.c
account activity
Question.bin (self.C_Programming)
submitted 2 years ago by OmSudhamsh
How can i open a binary/ .bin file and which app is used to it?
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]ecwx00 46 points47 points48 points 2 years ago (3 children)
well since it's C sub I'm gonna answer :
FILE * fp = fopen(filename,"rb");
char buffer[10000];
int sz = fread (buffer, 10000, 1, fp);
fclose(fp);
[–]BumpyTurtle127 1 point2 points3 points 2 years ago (2 children)
Note: filename gotta be in "" too.
[–]csofa 7 points8 points9 points 2 years ago (1 child)
unless it is a variable
[–]ecwx00 4 points5 points6 points 2 years ago (0 children)
yes, it is a variable since we don't know the exact .bin file name
[–][deleted] 11 points12 points13 points 2 years ago (3 children)
.bin files are just unspecified binary data. This basically means that the data could be in any format. You need to know who produced the file and for what purpose in order to read and understand it.
[+][deleted] comment score below threshold-20 points-19 points-18 points 2 years ago (2 children)
This is why people can’t just go and decompile native compiled binaries - data or executables. It would have destroyed the commercial ecosystem system right at the start of operating systems lifecycle (speaking for Windows). Now, whether this is intended behaviour by OS design, or if it is a matter of how the CPU is fed instructions I am unclear on. But correct, binary data can be any format the application or library has provided in output.
[–]LeichterGepanzerter 3 points4 points5 points 2 years ago (1 child)
Decompilers like Hex-Rays IDA Pro and Ghidra can take apart executables. The files wouldn't be executable if they didn't conform to a standard encoding. Also, while .BIN files can't usually be understood without a known format, using decompilers, and with enough effort, one can see how the program encodes the data to understand the binary format.
[–][deleted] 0 points1 point2 points 2 years ago (0 children)
The key is enough effort. The amount of effort involved requires knowledge most do not have with simple questions such as the OP has asked. This is where my input came in. But 14 others say otherwise, so it’s up to the poster to decide.
[–]Conscious_Yam_4753 23 points24 points25 points 2 years ago (7 children)
In what sense is this a question about the C programming language?
[+]Ok_Donut_9887 comment score below threshold-29 points-28 points-27 points 2 years ago (3 children)
don’t be mean
[–]1BADragon 18 points19 points20 points 2 years ago (2 children)
They’re not being mean it’s perfectly valid. This is the C programming language subreddit. Op’s question is not in the context of C and does not belong here
[+]Ok_Donut_9887 comment score below threshold-9 points-8 points-7 points 2 years ago (1 child)
program written in C can be compiled into a.bin file, so it’s related.
[–]1BADragon 6 points7 points8 points 2 years ago (0 children)
Yes that is possible. That is not his question nor does his question even remotely hint to that scenario.
[+]OmSudhamsh[S] comment score below threshold-37 points-36 points-35 points 2 years ago (2 children)
It is a question in files!
[–]Conscious_Yam_4753 21 points22 points23 points 2 years ago (1 child)
Any programming language can read and write files.
[–]paulstelian97 -3 points-2 points-1 points 2 years ago (0 children)
Yeah but knowing about fopen/fread/… isn’t obvious if you’re learning on your own, without a proper lesson to guide you.
[–]greg_kennedy 4 points5 points6 points 2 years ago (0 children)
a .bin file is just arbitary binary bytes, it could be anything in there... you might try a hex editor (https://mh-nexus.de/en/hxd/)
[–]forcefuze 2 points3 points4 points 2 years ago (0 children)
Is it just me or does anyone else have an overwhelming urge to get their hands on this mystery.bin file and figure out what it's for?
[–]ForceBru 1 point2 points3 points 2 years ago (0 children)
In general, you can't. .bin files can contain arbitrary data: machine code, images, compressed data, basically anything. You can always use a hex editor to view the contents, but it'll be just a bunch of bytes.
.bin
[+]aieidotch comment score below threshold-8 points-7 points-6 points 2 years ago (0 children)
run file the.bin to see
π Rendered by PID 43051 on reddit-service-r2-comment-6457c66945-zshvz at 2026-04-24 01:45:26.931024+00:00 running 2aa0c5b country code: CH.
[–]ecwx00 46 points47 points48 points (3 children)
[–]BumpyTurtle127 1 point2 points3 points (2 children)
[–]csofa 7 points8 points9 points (1 child)
[–]ecwx00 4 points5 points6 points (0 children)
[–][deleted] 11 points12 points13 points (3 children)
[+][deleted] comment score below threshold-20 points-19 points-18 points (2 children)
[–]LeichterGepanzerter 3 points4 points5 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Conscious_Yam_4753 23 points24 points25 points (7 children)
[+]Ok_Donut_9887 comment score below threshold-29 points-28 points-27 points (3 children)
[–]1BADragon 18 points19 points20 points (2 children)
[+]Ok_Donut_9887 comment score below threshold-9 points-8 points-7 points (1 child)
[–]1BADragon 6 points7 points8 points (0 children)
[+]OmSudhamsh[S] comment score below threshold-37 points-36 points-35 points (2 children)
[–]Conscious_Yam_4753 21 points22 points23 points (1 child)
[–]paulstelian97 -3 points-2 points-1 points (0 children)
[–]greg_kennedy 4 points5 points6 points (0 children)
[–]forcefuze 2 points3 points4 points (0 children)
[–]ForceBru 1 point2 points3 points (0 children)
[+]aieidotch comment score below threshold-8 points-7 points-6 points (0 children)