answersLogoWhite

0


Best Answer

fopen is a C library function used to open files in text mode, while open is a system call used to open files in Unix-like operating systems. fopen provides a higher level of abstraction and includes functions like fgets and fprintf for file I/O operations, whereas open returns a file descriptor that can be used with lower-level system calls like read and write.

User Avatar

AnswerBot

1mo ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago
  1. fopen is std.library function but open is a system call.
  2. fopen is finally converted into open system call.
  3. System call to perform its function but std.library are on user space implementation.
  4. Return type of fopen is FILE* , but open return type is an integer.
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between fopen and open?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you open a file in c plus plus?

fopen()


Which mode is used to open a binary file in write and read mode?

open: O_BINARY|O_RDWR fopen: "rb+"


How do you createe a file using c language?

Use function open or creat or fopen.


Write a PHP program to read and write a text file?

Oh this is easy =PLets say or file is "file.txt"


How do you extract the contents of a file in C?

Open it (open of fopen), read the data (read or fread), then close it (close or fclose).


How do you set the path for file handling in c?

file = fopen("numbers.txt", "r"); this way you can open a file in your working directory. file = fopen("/home/student/numbers.txt", "r"); this way, you can give the path and open a file.but i don't know how search for a file and open it.if someone can help me...


How do you open streamstr file?

Opening a file with the fopen function creates a new stream and establishes a connection between the stream and a file. This may involve creating a new file.


What is a statement use to open data file in c?

FILE* file; file = fopen("some-file.dat");


How do you use fopen to read PHP files?

To read PHP files using fopen in PHP, you would first need to open the file using fopen with "r" mode. This opens the file for reading. Remember to check if the file opened successfully, and then you can use functions like fread to read the content of the file. Finally, close the file with fclose when done.


What is the difference between installment credit and open ended credit?

the difference between installment credit and open ended credit is they are the same..


How can you block the PHP file fopen with chmod and are there similar functions used to open or modify files with PHP ASP or any other languages?

bash/sh: chmod -rw test.file php: fopen('test.file', 'r') - return false (and E_WARNING)


Difference between Miliary tuberculosis and open tuberculosis?

difference between miliary tuberculosis and tuberculosis