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

  • SEARCH
  • Home
  • 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 8657011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:25:04+00:00 2026-06-12T15:25:04+00:00

Lets take an example : i have an executable named a.out. This contains binary

  • 0

Lets take an example :
i have an executable named a.out. This contains binary information to print some text to STDOUT cos of printf.
So when I give ./a.out, i see output of printf at the console STDOUT

Say if i do ‘./a.out > tempFile’ in console. How does this work? Since there is printf inside a.out, ideally i except the text to be printed in STDOUT. How does redirection consume this text and why do we not see any output in console and only in the file we see the printf text

  • 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-12T15:25:05+00:00Added an answer on June 12, 2026 at 3:25 pm

    In UNIX, everything is a file. All stdout is by default is the (for example) /dev/tty file which is a device driver hooked up to your console/terminal/window. Output is just sent to that file (device driver) which causes it to be output to whatever you’re using for interactive I/O.

    All the a command like a.out >xyzzy.txt does is first connect the standard output of the program to that file rather than /dev/tty, hence the output shows up there instead.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Lets take this example. I have a AView which is bound to AViewModel. AView
I have a webpage, lets take for example StackOverflow. every box looks like this:
I have an issue with an SQL Query. Lets take this example data itemID
Lets take stackoverflow as an example: Post Postid Title Mess -------------------------------------------------- 1 Title1 This
I have a very basic question. Lets take this snippet: #include <stdio.h> void foo(void)
lets take for example i have a string declared: string master = 1.2.3.4; which
lets take this example, which I think covers all my questions: class SomeClass {
lets take for example two divs, <div class=main right></div> <div class=main></div> And this jQuery
Let's take an example where we have two entities: ServiceProvider and TelephoneNumber . The
I have a basic PHP question, take the code below for example, let's say

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.