Facebook Page Twitter Page LinkedIn Page
× C++ Standard Library C++ STL Library

The C++ <cstdio> FOPEN_MAX is a macro constant that expands to an integral expression that represents the maximum number of files that can be opened simultaneously. Particular library implementations may count files opened by tmpfile() towards this limit. Implementations may also allow more files to be opened beyond this limit.

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

#define FOPEN_MAX /*implementation defined*/             


The below example shows the value of FOPEN_MAX constant on a given implementation.

#include <cstdio>
int main (){
  //displaying the value of FOPEN_MAX
  printf("FOPEN_MAX = %d\n", FOPEN_MAX);
  return 0;

One of the possible output of the above code could be:


❮ C++ <cstdio> Library