Saturday, May 16, 2020

Operating Systems Question Bank with Answers 16

What is a file descriptor? What are the file descriptors in Unix OS for stdin, stdout, and stderr, respectively?


Question:
What is a file descriptor? What are the file descriptors in Unix OS for stdin, stdout, and stderr, respectively?

Answer:
A file descriptor is a handle represented by an integer that identifies an open file, pipe, or socket that belongs to a process. The kernel maintains a table of file descriptors that are used to reference open files and input/output (I/O) streams. 
In Unix, 0, 1, and 2 are reserved for standard input (stdin), standard output (stdout), and standard error (stderr), respectively.


******************
Related Questions:


  • What is a file descriptor? What are the file descriptors in Unix OS for stdin, stdout, and stderr respectively?

No comments:

Post a Comment

Featured Content

Multiple choice questions in Natural Language Processing Home

MCQ in Natural Language Processing, Quiz questions with answers in NLP, Top interview questions in NLP with answers Multiple Choice Que...

All time most popular contents

data recovery