Operating System Architecture Set 10

On This Page

This set of Operating System Architecture Multiple Choice Questions & Answers (MCQs) focuses on Operating System Architecture Set 10

Q1 | The default permission bits of a file when it is created for the first time, is controlled by
  • chmod value
  • fmask value
  • umask value
  • none of the above
Q2 | Let x.c be a C source code. The command cc x.c > y
  • is equivalent to the command cc x.c;mv a.out y
  • is equivalent to the command cc -o y x.c
  • serves no purpose
  • none of the above
Q3 | A file x is created with the following contentsecho today is: dateIf you type x.then
  • it echoes the message. followed by date.
  • it gives the desired output only if the execute permission of file x is set.
  • the desired output can be got by the command sh x. which works even if x has its execute permission not set.
  • both (b) and ©
Q4 | Shell script is preferable to other forms of programming because it
  • makes programming task easier
  • enhances portability
  • occupies less space
  • all of these
Q5 | Choose the incorrect statements.
  • shell scripts can accept arguments
  • shell scripts are interpreted
  • shell is a programming language
  • shell scripts are compiled
Q6 | Files that store data in the same format as used in program are called
  • binary files
  • source file
  • text file
  • core
Q7 | To allow only one user to work with a particular file at a particular time, one has to use
  • semaphore
  • critical region
  • locking
  • dedicated mode
Q8 | Which of the following remarks about realloc are true?
  • it allocates memory of required size that need not be contiguous
  • it may shift the existing block
  • it can work only with an existing block of memory
  • both (b) and ©
Q9 | The differences between malloc( ) and calloc() are:
  • malloc is used for dynamic allocation of memory, while cal:1c can\t be used for that purpose
  • malloc needs only one argument. while cal loc needs two.
  • unlike malloc, calloc allocates memory and initializes it to 0.
  • both (b) and ©
Q10 | The file that stores an integer as a sequence of characters is a
  • text file
  • data file
  • binary file
  • core file
Q11 | If cat x. prints garbage. then x is probably a
  • data file
  • binary file
  • text file
  • source file
Q12 | Which of the following file names can be found in more than one directoy?
  • passwd
  • bin
  • date
  • both (a) and (b)
Q13 | /bin
  • is a bucket for storing information
  • has files in binary code
  • is a directory
  • both (b) and ©
Q14 | The main reasons for the success of pipes are
  • the availability of many filter programs
  • unix treats devices as files
  • it provides a 2- way communication channel
  • both (a) and (b)
Q15 | Which of the following are not filter programs?
  • date
  • sort
  • cat
  • grep
Q16 | Redirection in pipes can be achieved by using
  • >
  • >>
  • tee
  • lpr
Q17 | Choose the correct statements.
  • the symbols > and | are both processed by shell
  • > can be used to direct output to a named file
  • | can be used to direct output to programs
  • all of above
Q18 | The command who sort - file1 > file2
  • results in an error
  • sorts the contents of file1 and puts it in file2
  • both (a) and (b)
  • none of the above
Q19 | The system identifies a file by its
  • name
  • absolute path
  • both (a) and (b)
  • mode number
Q20 | The system identifies the end of a file by the
  • eof character
  • file size
  • i-node number
  • both (a) and (b)
Q21 | The command line argument a.out x 'a b' "c d
  • is acceptable
  • is acceptable if the double quotes are replaced by single quotes
  • is acceptable if the single quotes arc replaced by double quotes
  • none of the above
Q22 | Which of the following metacharacters will be recognized by the shell. even if it comes within double quotes?
  • $
  • *
  • ?
  • none of these
Q23 | lint should be used
  • before compilation
  • to analyze a c code
  • after compilation
  • both (a) and (b)
Q24 | Environment variables can be accessed by
  • system programs
  • c programs
  • shell scripts
  • all of these
Q25 | Which of the following are character special files
  • terminal
  • printer
  • modem
  • all of these