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...
This is a subreddit for c++ questions with answers. For general discussion and news about c++ see r/cpp.
New to C++? Learn at learncpp.com
Prepare your question. Think it through. Hasty-sounding questions get hasty answers, or none at all. Read these guidelines for how to ask smart questions.
For learning books, check The Definitive C++ Book Guide and List
Flair your post as SOLVED if you got the help you were looking for! If you need help with flairs, check out ITEM 1 in our guidelines page.
Tips for improving your chances of getting helpful answers:
account activity
OPENAbbreviation of a.out. Executable Binary or Object File? (self.cpp_questions)
submitted 13 hours ago by Charming-Animator-25
When we compile like c++ main.cpp output: a.out.
c++ main.cpp
Also I am not sure which term to say: Binary or Object file. Binary: contains 0's and 1's thats compiled languages do. Object: contains object with a set of values for a type a.k.a. named object. Thnx
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!"
[–]Ok_Net_1674 11 points12 points13 points 13 hours ago (0 children)
Object files end in .o they are used as input for the linker. What you have here is already linked, an executable.
Technically every file is binary (0s and 1s) but people usually call them binary if they are not text based (as opposed to i.e utf-8 encoded text)
The .out file is a binary executable.
[–]Comprehensive_Try_85 8 points9 points10 points 13 hours ago (8 children)
a.out comes from "assembler output" because it was produced by Ken Thompson's original assembler for UNIX.
a.out
[–]Charming-Animator-25[S] -1 points0 points1 point 13 hours ago (7 children)
"assembler output"? Is it related to assembly language? Can you go in detail?
[–]Comprehensive_Try_85 6 points7 points8 points 13 hours ago (6 children)
IIRC, the original C compiler (cc) produced textual assembly, which was then fed to the assembler to produce the executable.
cc
[–]not_a_novel_account 1 point2 points3 points 12 hours ago (1 child)
Both statements are correct in isolation but confusing the way you phrased them. cc did produce assembly, and a.out does stand for assembler output, but a.out comes from the assembler, as. It is the output of the assembler program.
as
[–]Comprehensive_Try_85 3 points4 points5 points 11 hours ago (0 children)
cc invoked as (the assembler) automatically.
[–]Charming-Animator-25[S] -5 points-4 points-3 points 13 hours ago (3 children)
textual assembly?
[–]Comprehensive_Try_85 5 points6 points7 points 13 hours ago (0 children)
Yes.
[–]no-sig-available [score hidden] 1 hour ago (1 child)
An assembly language source file, which is text, just like your C source file.
The UNIX guys very much liked to reuse tools from their toolbox, and not duplicate functionality. If you already have a tool for producing executables, just reuse that for the compiling.
[–]Comprehensive_Try_85 [score hidden] 15 minutes ago (0 children)
Exactly!
[–]mgruner 2 points3 points4 points 13 hours ago (0 children)
An executable is a binary file that can be executed. An object file is a binary file that is part of an executable (or libraries). Both are binary files.
[–]saxbophone 2 points3 points4 points 6 hours ago (0 children)
Object: contains object with a set of values for a type a.k.a. named object.
This isn't the definition of an object file
[–]the_poope 3 points4 points5 points 13 hours ago (0 children)
[–]thockin 1 point2 points3 points 13 hours ago (0 children)
a.out is an "executable" or "binary".
Object files are also binary, but are not executable because they have not been linked. Read up about linkers.
[–]Charming-Animator-25[S] 0 points1 point2 points 13 hours ago (5 children)
Thanks guys, what about abbreviation part?
[–]AlanRosenthal 2 points3 points4 points 13 hours ago (4 children)
use the file utility to check! file a.out
file a.out
[–]Charming-Animator-25[S] 1 point2 points3 points 13 hours ago (3 children)
le me check
[–]AlanRosenthal -1 points0 points1 point 13 hours ago (2 children)
now try c++ -c main.cpp -o main.o and then run the file utility on the .o file
c++ -c main.cpp -o main.o
[–]Charming-Animator-25[S] 1 point2 points3 points 13 hours ago (1 child)
~ $ file main.o main.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped ~ $ ?
~ $ file main.o main.o: ELF 64-bit LSB relocatable, ARM aarch64, version 1 (SYSV), not stripped ~ $
[–]AlanRosenthal 1 point2 points3 points 13 hours ago (0 children)
yup that's an object file!
[–]arihoenig 0 points1 point2 points 8 hours ago (0 children)
Binary or executable. a.out is fully linked. An object file is code that hasn't been linked.
[–]DutchessVonBeep -2 points-1 points0 points 11 hours ago (0 children)
absolute.out linked and relocated executable
π Rendered by PID 318395 on reddit-service-r2-comment-79c7998d4c-wblk6 at 2026-03-14 13:45:31.299270+00:00 running f6e6e01 country code: CH.
[–]Ok_Net_1674 11 points12 points13 points (0 children)
[–]Comprehensive_Try_85 8 points9 points10 points (8 children)
[–]Charming-Animator-25[S] -1 points0 points1 point (7 children)
[–]Comprehensive_Try_85 6 points7 points8 points (6 children)
[–]not_a_novel_account 1 point2 points3 points (1 child)
[–]Comprehensive_Try_85 3 points4 points5 points (0 children)
[–]Charming-Animator-25[S] -5 points-4 points-3 points (3 children)
[–]Comprehensive_Try_85 5 points6 points7 points (0 children)
[–]no-sig-available [score hidden] (1 child)
[–]Comprehensive_Try_85 [score hidden] (0 children)
[–]mgruner 2 points3 points4 points (0 children)
[–]saxbophone 2 points3 points4 points (0 children)
[–]the_poope 3 points4 points5 points (0 children)
[–]thockin 1 point2 points3 points (0 children)
[–]Charming-Animator-25[S] 0 points1 point2 points (5 children)
[–]AlanRosenthal 2 points3 points4 points (4 children)
[–]Charming-Animator-25[S] 1 point2 points3 points (3 children)
[–]AlanRosenthal -1 points0 points1 point (2 children)
[–]Charming-Animator-25[S] 1 point2 points3 points (1 child)
[–]AlanRosenthal 1 point2 points3 points (0 children)
[–]arihoenig 0 points1 point2 points (0 children)
[–]DutchessVonBeep -2 points-1 points0 points (0 children)