Tag: programming languages

Questions Related to programming languages

Which of the following are syntax that can be used to declare a function?

  1. function_name() {command-list }

  2. function_name ( ) { }

  3. function name (command list ) {

  4. None


Correct Option: A
  1. cat testfile >redirfile

  2. cat testfile >>redirfile

  3. cat testfile 1> redirfile

  4. cat testfile 2> redirfile


Correct Option: B

"What stream usually outputs error messages to the screen? "

  1. stdout

  2. stderr

  3. stderr2

  4. stdouterr


Correct Option: B

"What does the read command do while it waits for input? "

  1. Tests for command-line arguments

  2. Shifts arguments to the left

  3. Exits the program

  4. Creates a pause in the program


Correct Option: D
  1. chattr +i /etc/inputrc

  2. chmod 666 inputrc

  3. chmod g=rw inputrc

  4. None


Correct Option: A

What Linux file would you use when performing a rescue after a hard disk problem occurs?

  1. /dev/hda1

  2. /dev/null

  3. /dev/ram

  4. /dev/tty


Correct Option: A