0

operating systems Online Quiz - 77

Description: operating systems Online Quiz - 77
Number of Questions: 20
Created by:
Tags: operating systems
Attempted 0/20 Correct 0 Score 0

Windows Firewall

  1. firewall.cpl

  2. winfirewall.cpl

  3. winfwall

  4. firewall


Correct Option: B

WindowsFirewall

  1. firewall

  2. firewall.cpl

  3. winfirewall.cpl

  4. winfwall


Correct Option: A

Command to display all running process

  1. ps -aux

  2. ps -u

  3. ps -e

  4. ps


Correct Option: A

How do you open My Computer?

  1. Windows Logo + E

  2. Windows Logo + D

  3. Windows Logo + Z

  4. None


Correct Option: A

How do you display the desktop?

  1. Windows Logo + E

  2. Windows Logo + D

  3. Windows Logo + M

  4. None


Correct Option: B

How can you display the start menu?

  1. Ctrl + S

  2. Windows Logo + D

  3. Windows Logo

  4. None


Correct Option: C

What is the shortcut to redo the last command?

  1. Ctrl + R

  2. Ctrl + Y

  3. Ctrl + Z

  4. None


Correct Option: B

What is the shortcut to rename a file?

  1. F8

  2. Ctrl + W

  3. F2

  4. None


Correct Option: C

What is the shortcut to search for a file or folder?

  1. Ctrl + S

  2. F3

  3. Shift + F8

  4. None


Correct Option: B

What is the shortcut to expand the current selection?

  1. Ctrl + E

  2. right arrow

  3. left arrow

  4. None


Correct Option: B

What is the shortcut to activate the menu bar in a program?

  1. F1

  2. F10

  3. F3

  4. None


Correct Option: B

AI Explanation

To answer this question, you need to know the shortcut key to activate the menu bar in a program.

Let's go through each option to understand why it is correct or incorrect:

Option A) F1 - This option is incorrect because the F1 key is typically used for accessing Help files or documentation in a program, not for activating the menu bar.

Option B) F10 - This option is correct. Pressing the F10 key on your keyboard usually activates the menu bar in a program. This allows you to navigate through the different menus and access various options.

Option C) F3 - This option is incorrect. The F3 key is commonly used for searching or finding text within a program, not for activating the menu bar.

Option D) None - This option is incorrect. There is a shortcut key to activate the menu bar in a program, which is the F10 key.

The correct answer is B) F10. This option is correct because pressing the F10 key usually activates the menu bar in a program, allowing you to navigate through the menus and access different options.

  1. diskpartition

  2. diskpart

  3. diskpartition.msc

  4. diskpartition.cpl


Correct Option: B

How could you check if two strings are equal?

  1. test $a -eq $b

  2. test $a -equal $b

  3. test $a = $b

  4. sh -c test $a == $b


Correct Option: C

Which of the following would return the process ID of the sleep command?

  1. test sleep 1

  2. sleep 1 && echo $0

  3. sleep 1 & echo $!

  4. sleep 1 & echo $$


Correct Option: C

Which of the following will always output "maple"?

  1. tree=maple; export tree; sh -c "echo $tree"

  2. tree=maple; export $tree; sh -c "echo $tree"

  3. $tree=maple; echo $tree

  4. export tree = maple; echo $tree


Correct Option: A

AI Explanation

To answer this question, we need to understand how variable assignment and echoing work in shell scripting.

Option A) tree=maple; export tree; sh -c "echo $tree" - This option is correct. Here, the variable "tree" is assigned the value "maple", then it is exported using the "export" command. The "sh -c" command is used to run the following command in a subshell. The "echo $tree" command is used to print the value of the variable "tree", which is "maple".

Option B) tree=maple; export $tree; sh -c "echo $tree" - This option is incorrect. In this case, the variable "tree" is assigned the value "maple", but when exporting the variable using "export $tree", the shell will interpret it as exporting the value of the variable "maple" (which is empty). Therefore, the echoed value will be empty.

Option C) $tree=maple; echo $tree - This option is incorrect. When assigning the value "maple" to the variable "$tree", the shell will interpret it as trying to assign the value of a variable named "maple" to the variable "$tree", which is not what we want. Therefore, this option will result in an error.

Option D) export tree = maple; echo $tree - This option is incorrect. When exporting a variable, we should not include spaces around the "=" sign. So, the correct syntax should be "export tree=maple". Additionally, the echo command should be used after the export command to print the value of the variable. Therefore, this option will result in an error.

The correct answer is Option A. This option correctly assigns the value "maple" to the variable "tree", exports it, and then prints the value of the variable using the echo command.

To change access modes on files you can use the chmod command ?

  1. True

  2. False


Correct Option: A

What is the difference between for i in "$@" and for i in "$*" ?

  1. "$@" takes the entire list and seperates it into special arguments whereas "$*" takes the entire list as one argument with spaces between them

  2. "$*" takes the entire list and seperates it into special arguments whereas "$@" takes the entire list as one argument with spaces between them

  3. Both statements will behave in the same way

  4. None of the above


Correct Option: A

while getopts a:bc arg ; docase $arg ina ) echo "$OPTIND" ;;b ) echo "$OPTIND" ;;c ) echo "$OPTIND";;esacdoneWhat does the colon(':') after 'a' in the first line signify ?"

  1. The getopts command ensures that a parameter is passed for -b option

  2. It signifies that u have to either specify -a option or you have to specify both -b and -c options

  3. The ":" has no effect in the command

  4. The getopts command ensures that a parameter is passed for -a option


Correct Option: D

How will you search for the character '\' in a file ?

  1. grep '\' filename

  2. grep \\ filename

  3. grep '\\' filename

  4. grep "\\" filename


Correct Option: A,B,D
- Hide questions