Home
Archaeology
Astronomy
Biology
Books
Business
Chemistry
Coins
Computers
Conservation
Cooking
Earth Science
Farming
Economics
Finance
Games
Geography
Health Science
History by Date
Hobbies
Law
Mathematics
Medicine
Military Technology
Movies
Music
People
Pharmacology
Philosophy
Physics
Psychology
Religion
Science History
Technology
Sports
Television
Video
Visual Art
Privacy
Contact Us



Fopen

In computer programming, the fopen, with related functions fdopen and freopen, is one of the basic functions in the C programming language. Because it is so popular, many script languages derived from C tend to provide the same function with the same or similar functionality. It is considered higher-level than the open system call of UNIX operating systems.

They are defined as.

FILE * fopen(const char *path, const char *mode);
FILE * fdopen(int fildes, const char *mode);
FILE * freopen(const char *path, const char *mode, FILE * restrict stream);

In some libraries, mode can include a letter b, which indicates the given file is a binary file. Without that, a sequence of carriage return and line feed is automatically regarded as a line feed. See new line for new line issues.

Copyright 2004. All rights reserved.