C++ Standard Library C++ STL Library

C++ <cstdio> - BUFSIZ constant

The C++ <cstdio> BUFSIZ is a macro constant that expands to an integral expression with the size of the buffer used by the setbuf() function.

In the <cstdio> header file, it is defined as follows:

#define BUFSIZ /*implementation defined*/             


The example below shows the value of BUFSIZ constant in a given implementation.

#include <cstdio>
int main (){

  //displaying the value of BUFSIZ
  printf("BUFSIZ = %d\n", BUFSIZ);
  return 0;

The output of the above code will be:

BUFSIZ = 8192

❮ C++ <cstdio> Library