Department of Information and Computer Science
|
![]() |
Note that many students are only familiar with fopen, which returns a FILE *: In contrast, open returns a file descriptor, which is simply a small integer that tells the OS what file you are accessing. For example, file descriptor 0 is stdin, 1 is stdout, and 2 is stderr