Computer Science Fundamentals Operating Systems Objective
Mar 08, 2013

Which one is correct statement

Choose the correct answer:
A) To read successive characters from an open file . getchar and scan f can be used interchangeably
B) To read successive characters from an open file. getchar and read can be used interchangeably
C) The read system call reads from the buffer
D) The write system call write from the buffer
Detailed Explanation

The library i /o functions (like getchar, scanf , gets etc.) use the same interme-diate buffer and share the same file pointer. So, they can be interleaved in any order to access consecutive characters in a tile without causing any inconsistency. Unlike them. system calls (like read and write) directly manipulate the tile. So, mixing system calls and library function will have undesired consequence

Discussion (0)

No comments yet. Be the first to share your thoughts!

Share Your Thoughts
Feedback