Tag: programming languages

Questions Related to programming languages

  1. Always after execution has left a try{} block, no matter for what reason.

  2. Only when an unhandled exception is thrown in a try{} block.

  3. Only when any exception is thrown in a try{} block.

  4. Always just as a method is about to finish.


Correct Option: A
  1. lseek(), open(), write(), close()

  2. open(), write(), lseek(), close()

  3. open(), lseek(), open(), , write() close()

  4. None


Correct Option: B
  1. vforlk() allows more one child process to be created simaltaneously whereas for() allows only one

  2. vfork() retains same PID for child & parent known as virtual PID

  3. vfork() suspends the parent process until child process exits

  4. fork() & vfork() are same


Correct Option: C
  1. getenv(), setenv()

  2. getenv(), putenv()

  3. readenv(), writeenv()

  4. You cannot environmement variables inside a program


Correct Option: B
  1. Wakes up kernel from sleeping

  2. Wakes up devices from sleeping

  3. Invokes a kernel to send SIGALARM to the calling process

  4. Invokes a kernel to send SIGALARM to the registered process


Correct Option: D

What is a shared memory

  1. A memeory shared between kernel & devices

  2. A memory shared between root user and ordinary user

  3. A memory shared across processes

  4. Harddisk


Correct Option: C
  1. The interval between child terminating and the parent calling wait()

  2. The interval between parent terminating and the child calling popen()

  3. The interval between parent terminating and the child termination

  4. None


Correct Option: B

Why do processes never decrease in size?

  1. They never releases the memory utilized

  2. They release the memory but kernel does not use them

  3. Since they are running

  4. It’s a false statement


Correct Option: B
  1. Its not possible

  2. use isused() function

  3. Try to open file with locking enabled

  4. Try to write the file after opening


Correct Option: C
  1. Use filelock()

  2. use lockfile()

  3. Use lockfd()

  4. use fcntl()


Correct Option: D