answersLogoWhite

0


Best Answer

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

12y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the difference between fseek and lseek?
Write your answer...
Submit
Still have questions?
magnify glass
imp
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 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


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.


What difference between paging?

Difference between paging and what?


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


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

difference between enterprise and corporation


What is the difference between a samurai and shogun?

The difference between a shogun and a samurai is like the difference between a king and a knight.