Explore topic-wise MCQs in Distributed Operating System.

This section includes 12 Mcqs, each offering curated multiple-choice questions to sharpen your Distributed Operating System knowledge and support exam preparation. Choose a topic below to get started.

1.

Which function is useful when you want to output the executed command’s result?

A. ut_cmm()
B. ut_system()
C. mm()
D. ystem()
Answer» E.
2.

Which function sets the file filename’s last-modified and last-accessed times?

A. ets()
B. et()
C. ouch()
D. ouched()
Answer» D. ouched()
3.

Which of the following functions reads the entire contents of a file?1. fgets()2. file_get_contents()3. fread()4. readfile()5. file()

A. ption 3 and 5
B. ption 1, 3 and 4
C. ption 2, 4 and 5
D. ption 2 and 4
Answer» D. ption 2 and 4
4.

flock() is used to unlock a file so that two or more people do not get access to it at the same time.

A. rue
B. alse
Answer» C.
5.

What is the difference between stat() and fstat()?

A. hile stat() works on open file pointers, fstat() works on files specified by pathname
B. hile fstat() works on open file pointers, stat() works on files specified by pathname
C. stat() has nothing to do with files
D. tat() has nothing to do with files
E. stat() is an alias of stat()
Answer» C. stat() has nothing to do with files
6.

fgets() is used to read a file one line at a time.

A. rue
B. alse
Answer» B. alse
7.

Which of the following functions retrieve the entire contents of a file in such a way that it can be used as part of an expression?1. file_get_contents()2. fgets()3. fopen()4. file()5. readfile()

A. ption 2 and 4
B. ption 1 and 5
C. ption 1 and 4
D. ption 3 and 4
Answer» D. ption 3 and 4
8.

The ........... function is used to read a single character from a file.

A. getc()
B. gets()
C. get()
D. getf()
Answer» B. gets()
9.

The ............ function checks if the "end-of-file" (EOF) has been reached.

A. _eof()
B. _of()
C. eofs()
D. eof()
Answer» E.
10.

What should you do if your script is having problem recognizing file endings from a text file saved on a platform different from the one you’re reading it on?

A. hange the auto_detect_line_endings INI setting
B. se a regular expression to detect the last letter of a line
C. se fpos()
D. se ftok()
E. ead the file one character at a time
Answer» B. se a regular expression to detect the last letter of a line
11.

What is the purpose of basename() function?

A. eturns the last accessed time of the file
B. eturns the first accessed time of the file
C. trips of the path and returns the file name
D. trips of the path and returns the folder name
Answer» D. trips of the path and returns the folder name
12.

WHAT_ARE_NON_CHARACTERISTICS_OF_SESSION_SEMANTICS_??$

A. Each client obtains a working copy from the server
B. When file is closed, the modified file is copied to the file server
C. The burden of coordinating file sharing is ignored by the system
D. Easy to implement in a single processor system
Answer» E.