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 8048099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:19:18+00:00 2026-06-05T06:19:18+00:00

Today I learned that stdout is line buffered when it’s set to terminal and

  • 0

Today I learned that stdout is line buffered when it’s set to terminal and buffered in different cases. So, in normal situation, if I use printf() without the terminating ‘\n’ it will be printed on the screen only when the buffer will be full. How to get a size of this buffer, how big is this?

  • 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-05T06:19:19+00:00Added an answer on June 5, 2026 at 6:19 am

    The actual size is defined by the individual implementation; the standard doesn’t mandate a minimum size (based on what I’ve been able to find, anyway). Don’t have a clue on how you’d determine the size of the buffer.

    Edit

    Chapter and verse:

    7.19.3 Files

    …
    3 When a stream is unbuffered, characters are intended to appear from the source or at the
    destination as soon as possible. Otherwise characters may be accumulated and
    transmitted to or from the host environment as a block. When a stream is fully buffered,
    characters are intended to be transmitted to or from the host environment as a block when
    a buffer is filled. When a stream is line buffered, characters are intended to be
    transmitted to or from the host environment as a block when a new-line character is
    encountered. Furthermore, characters are intended to be transmitted as a block to the host
    environment when a buffer is filled, when input is requested on an unbuffered stream, or
    when input is requested on a line buffered stream that requires the transmission of
    characters from the host environment. Support for these characteristics is
    implementation-defined, and may be affected via the setbuf and setvbuf functions
    .

    Emphasis added.

    “Implementation-defined” is not a euphemism for “I don’t know”, it’s simply a statement that the language standard explicitly leaves it up to the implementation to define the behavior.

    And having said that, there is a non-programmatic way to find out; consult the documentation for your compiler. “Implementation-defined” also means that the implementation must document the behavior:

    3.4.1

    1 implementation-defined behavior
    unspecified behavior where each implementation documents how the choice is made

    2 EXAMPLE An example of implementation-defined behavior is the propagation of the high-order bit
    when a signed integer is shifted right.

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

Sidebar

Related Questions

Today I learned that one of the .NET libraries I use, OpenTK, requires me
So today I've learned that BouncyCastle is the default RSA Encryption Provider on Android
I'm a student in Java class and learned something about Java today that made
Just today learned that one of my websites, TwitPeek.net, is not rendering properly in
Today Recently on Stackoverflow i learned that: reintroduce is used to hide ancestor constructors
I learned today through this section of the MySQL documentation that prepared statements cannot
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
I learned today that there are digraphs in C99 and C++. The following is
I was working on an html form today, and I learned that keeping the
I just learned subprocess.check_call() function today. I intend to use it to replace my

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.