Q.1
What does os.name contain?
  • a) the name of the operating system dependent module imported
  • b) the address of the module os
  • c) error, it should’ve been os.name()
  • d) none of the mentioned
Q.2
What does print(os.geteuid()) print?
  • a) the group id of the current process
  • b) the user id of the current process
  • c) both the group id and the user of the current process
  • d) none of the mentioned
Q.3
What does os.getlogin() return?
  • a) name of the current user logged in
  • b) name of the superuser
  • c) gets a form to login as a different user
  • d) all of the mentioned
Q.4
What does os.close(f) do?
  • a) terminate the process f
  • b) terminate the process f if f is not responding
  • c) close the file descriptor f
  • d) return an integer telling how close the file pointer is to the end of file
Q.5
What does os.fchmod(fd, mode) do?
  • a) change permission bits of the file
  • b) change permission bits of the directory
  • c) change permission bits of either the file or the directory
  • d) none of the mentioned
Q.6
Which of the following functions can be used to read data from a file using a file descriptor?
  • a) os.reader()
  • b) os.read()
  • c) os.quick_read()
  • d) os.scan()
Q.7
Which of the following returns a string that represents the present working directory?
  • a) os.getcwd()
  • b) os.cwd()
  • c) os.getpwd()
  • d) os.pwd()
Q.8
What does os.link() do?
  • a) create a symbolic link
  • b) create a hard link
  • c) create a soft link
  • d) none of the mentioned
Q.9
Which of the following can be used to create a directory?
  • a) os.mkdir()
  • b) os.creat_dir()
  • c) os.create_dir()
  • d) os.make_dir()
Q.10
Which of the following can be used to create a symbolic link?
  • a) os.symlink()
  • b) os.symb_link()
  • c) os.symblin()
  • d) os.ln()
0 h : 0 m : 1 s