answersLogoWhite

0

lseek is a system call, but fseek is a C function belonging to the ANSI C standard library, and included in the file stdio.h

lseek uses file descriptor (return by open system call), but fseek uses pointer to FILE structure (return by fopen ANSI C library function) (though file desctor and FILE * can be used interchangeably several times).

System calls are to communicate directly with an operating system. Generally, system calls are slower than normal function calls.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What function returns the last but one character of end of file?

read/fread/fgetc, but beforehand you have to use lseek/llseek/fseek


Which function is used to move file pointer from any position in file in c language?

FILE-level: ftell/fseek, fgetpos/fsetpos handle-level: lseek


What are the Unix system calls for Input and Output?

In Unix, the primary system calls for input and output are read(), write(), open(), close(), and lseek(). The open() call is used to open a file descriptor for reading or writing, while read() and write() perform the actual data transfer between the file descriptor and a buffer in memory. The close() call is used to close the file descriptor, and lseek() allows for repositioning the file pointer within the file. These calls provide a low-level interface for file and device I/O operations.


What is a function to read chars from a certain position to another position in file in C?

Call functions fread, then function fseek, then function fwrite.


What is difference between as on and as at?

difference between as on and as at


What are the differences between California and Florida?

What is the difference between Florida and California What is the difference between Florida and California


What is the difference between physician and doctor?

what's the difference between physician and doctorwhat's the difference between physician and doctor what's the difference between physician and doctor


What difference between paging?

Difference between paging and what?


What is the difference between difference and difference?

The answer of difference


How do you detect an empty file in a c program?

Seek to the end of the file (fseek) and check how many bytes are in the file If the byte count is zero the file is empty.


How would you use the functions fseek freed fwrite and ftell?

fread(s,i1,i2,f) Enter i2 dataitems,each of size i1 bytes,from file f to string s. fseek(f,1,i) Move the pointer for file f a distance 1 byte from location i. ftell(f) Return the current pointer position within file f. fwrite(s,i1,i2,f) send i2 data items,each of size i1 bytes from string s to file f. The data type returned for functions fread,fseek and fwrite is int and ftell is long int.


What is the difference between an enterprise and association what is the difference between an pvt ltd and ltd.?

difference between enterprise and corporation