Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9038269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T09:26:50+00:00 2026-06-16T09:26:50+00:00

I compile the following program with gcc and receive an output executable file a.out

  • 0

I compile the following program with gcc and receive an output executable file a.out.:

#include <stdio.h>
int main () {
  printf("hello, world\n");
}

When I execute cat a.out, why is the file in “gibberish” (what is this called?) and not machine language of 0s and 1s:

??????? H__PAGEZERO(__TEXT__text__TEXT?`??__stubs__TEXT 
P__unwind_info__TEXT]P]__eh_frame__TEXT?H??__DATA__program_vars [continued]
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T09:26:52+00:00Added an answer on June 16, 2026 at 9:26 am

    The file is in 0 and 1, but when you open it with text editor those bits are grouped in bytes and then treated as text 😉 In Linux you could try to disassemble the output file to ensure that it contains machine instructions (x86 architecture):

    objdump -D -mi386 a.out

    Example output:

    1:  83 ec 08                sub    $0x8,%esp
    4:  be 01 00 00 00          mov    $0x1,%esi
    9:  bf 00 00 00 00          mov    $0x0,%edi 
    

    The second column contains that 0’s and 1’s in hexadecimal notation and the third column contains mnemonic assembler instructions.

    If you want to display those 0’s and 1’s simply type:

    xxd -b a.out

    Example output:

     0000000: 01111111 01000101 01001100 01000110 00000010 00000001  .ELF..
     0000006: 00000001 00000000 00000000 00000000 00000000 00000000  ......
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have the following c program: #include <stdio.h> int main() { printf(Hello world
I wrote the following program: #include<stdio.h> int main(void) { float f; printf(\nInput a floating-point
I tried to compile following program with gcc. 0 #include <stdio.h> 1 2 main
Suppose I have the following program: #include <stdio.h> int main() { printf(This is a
I'm trying to compile the following program: #include<functional> #include<iostream> int main(int argc, char* argv[],
The following C++ program compiles and runs as expected: #include <stdio.h> int main(int argc,
I am trying to compile the following program: #include <iostream> int main(){ std::cout <<
I typed the following program: #include <stdio.h> int main(void) { int a = 3;
Hi I have the following program. When I compile on the terminal gcc main.c
I compiled the following program with gcc -fprofile-arcs -ftest-coverage test.c: int main() { int

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.