Tag: programming languages

Questions Related to programming languages

"Without using the shift command, what range of command-line argument variables can be referenced correctly? "

  1. $0 to $9

  2. $0 to $10

  3. $1 to $9

  4. $1 to $10


Correct Option: A

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

"Which directory is the standard for storing shell scripts created by systems adminstrators? "

  1. /etc

  2. /bin

  3. /dev

  4. /rc.d


Correct Option: B
  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

"The ______ loop executes as long as the condition returns an exit status of zero, whereas the _______ loop executes unless the condition returns a zero exit status. "

  1. while,until

  2. until, while

  3. repeat, while

  4. None


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

  2. chmod 666 inputrc

  3. chmod g=rw inputrc

  4. None


Correct Option: A