GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Well-structured Std 11 Computer Textbook MCQ Answers and Std 11 Computer MCQ Answers Ch 8 Advanced Scripting can serve as a valuable review tool before computer exams.

GSEB Std 11 Computer Chapter 8 MCQ Advanced Scripting

Question 1.
The ……………. are used for routine system administration tasks.
(A) command
(B) expression
(C) environment variable
(D) shell Script
Answer:
(D) shell Script

Question 2.
……………….. are the best tools an administrator can get to easily monitor and control his systems even if he is at remote location.
(A) Command
(B) Expression
(C) Environment variable
(D) Shell Script
Answer:
(D) Shell Script

Question 3.
…………… means the commands are executed in the same order in which they appear in the script.
(A) Sequential
(B) Non Linear
(C) Loop
(D) Condition Statement
Answer:
(A) Sequential

Question 4.
Sequential means the commands are executed in
the same order in which they appear in the script.
(A) The commands are executed repeatedly in the script.
(B) The commands are executed in the same order in which they appear in the script.
(C) The commands are executed non linear in the script.
(D) None of these
Answer:
(B) The commands are executed in the same order in which they appear in the script.

Question 5.
………………. is a program loaded into memory and running.
(A) Shell Script
(B) Command
(C) PID
(D) Process
Answer:
(D) Process

Question 6.
Each process when started has a unique number associated with it known as ………………
(A) shell Script
(B) command
(C) PID
(D) process
Answer:
(C) PID

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 7.
In Linux all programs are executed as ………………
(A) shell Script
(B) variables
(C) loop
(D) process
Answer:
(D) process

Question 8.
Process can be ………………
(A) viewed
(B) stopped
(C) running (executing)
(D) all of these
Answer:
(D) all of these

Question 9.
Which command is used To see the processes associated with the current shell ?
(A) ps command without any parameters
(B) ps command with any parameters
(C) sp command with parameters
(D) sp command without parameters
Answer:
(A) ps command without any parameters

Question 10.
Which command is used to view the process of all the users ?
(A) ps -ef
(B) ps -e
(C) ps -f
(D) ps -fe
Answer:
(A) ps -ef

Question 11.
In ps -ef , UID is ……………..
(A) a unique numeric process identifier assigned to each process.
(B) name or number of the user who owns the process.
(C) identifies the parent process id, the process that created the current process.
(D) none of these
Answer:
(B) name or number of the user who owns the process.

Question 12.
In ps -ef ,PID is ……………. .
(A) a unique numeric process identifier assigned to each process.
(B) name or number of the user who owns the process.
(C) identifies the parent process id, the process that created the current process.
(D) all of these
Answer:
(A) a unique numeric process identifier assigned to each process.

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 13.
In ps -ef ,PPID is …………….
(A) a unique numeric process identifier assigned to each process.
(B) name or number of the user who owns the process.
(C) identifies the parent process id, the process that created the current process.
(D) none of these
Answer:
(C) identifies the parent process id, the process that created the current process.

Question 14.
In ps -ef ,STIME is …………….
(A) the start time for the current process.
(B) identifies the amount of CPU time accumulated by the current process.
(C) identifies the parent process id, the process that created the current process.
(D) all of these
Answer:
(A) the start time for the current process.

Question 15.
In ps -ef ,TIME is ………………
(A) the start time for the current process.
(B) identifies the amount of CPU time accumulated by the current process.
(C) identifies the parent process id, the process that created the current process.
(D) none of these
Answer:
(B) identifies the amount of CPU time accumulated by the current process.

Question 16.
In ps -ef ,TTY is ……………..
(A) the start time for the current process.
(B) identifies the terminal that controls the current process.
(C) identifies the parent process id, the process that created the current process.
(D) identifies the command used to invoke the process.
Answer:
(B) identifies the terminal that controls the current process.

Question 17.
In ps -ef ,CMD is ……………….
(A) the start time for the current process.
(B) identifies the terminal that controls the current process.
(C) identifies the parent process id, the process that created the current process.
(D) identifies the command used to invoke the process.
Answer:
(D) identifies the command used to invoke the process.

Question 18.
In ps -ef, ……………… is the name or number of the user who owns the process.
(A) PPID
(B) PID
(C) UID
(D) TTY
Answer:
(C) UID

Question 19.
In ps -ef, ……………. is a unique numeric process identifier assigned to each process.
(A) PPID
(B) PID
(C) UID
(D) TTY
Answer:
(B) PID

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 20.
In ps -ef, ……………… identifies the parent process id, the process that created the current process.
(A) PPID
(B) PID
(C) UID
(D) TTY
Answer:
(A) PPID

Question 21.
In ps -ef, ……………. is the start time for the current process.
(A) PPID
(B) TTY
(C) STIME
(D) TIME
Answer:
(C) STIME

Question 22.
In ps -ef, ……………… identifies the terminal that controls the current process.
(A) PPID
(B) TTY
(C) STIME
(D) PID
Answer:
(B) TTY

Question 23.
In ps -ef, …………….. identifies the amount of CPU time accumulated by the current process.
(A) PPID
(B) TTY
(C) STIME
(D) TIME
Answer:
(D) TIME

Question 24.
In ps -ef, ………………… identifies the command used to invoke the process.
(A) PPID
(B) TTY
(C) STIME
(D) CMD
Answer:
(D) CMD

Question 25.
Which command is used to remove the process from memory ?
(A) Exit
(B) Stop
(C) Kill
(D) None of these
Answer:
(C) Kill

Question 26.
$1, $2, $3 … till $9 are called ……………
(A) command line arguments
(B) shell variables
(C) commands
(D) shell script
Answer:
(A) command line arguments

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 27.
$1, $2, $3 … till $9 are called ……………
(A) command line arguments
(B) dollar variables
(C) shell variables
(D) both (A) and (B)
Answer:
(A) command line arguments

Question 28.
The first command line argument is …………
(A) $0
(B) $1
(C) $2
(D) $3
Answer:
(B) $1

Question 29.
The first command line argument is ……………
(A) $10
(B) $9
(C) $11
(D) $12
Answer:
(B) $9

Question 30.
The if-then-elif-then-else-fi statement looks clumsy as number of comparison grows.
(A) True
(B) False
(C) None of these
(D) Both (A) and (B)
Answer:
(A) True

Question 31.
When number of comparison (condition) grows it is advisable to use …………..
(A) if—elif—else—fi
(B) if – else-fi
(C) case – esac
(D) while loop
Answer:
(C) case – esac

Question 32.
All the statements written within the section of case are executed till two …………… are encountered.
(A) semicolons (;;)
(B) colons (::)
(C) fullstops(..)
(D) commas(,,)
Answer:
(A) semicolons (;;)

Question 33.
All the statements written within the section of case are executed till ……………… semicolon(s) are encountered.
(A) four
(B) three
(C) two
(D) one
Answer:
(C) two

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 34.
Once semicolons are encountered in case construct the control is transferred to the ……………
(A) next section of the case statement
(B) *) section of the case statement
(C) line before the end of the case statement
(D) line after the end of the case statement
Answer:
(D) line after the end of the case statement

Question 35.
Once ……………. are encountered in case construct the control is transferred to the line after the end of the case statement.
(A) semicolons (;;)
(B) colons (::)
(C) fullstops(..)
(D) commas(,,)
Answer:
(A) semicolons (;;)

Question 36.
The end of case statement is specified by …………….. keyword.
(A) case
(B) esac
(C) asec
(D) esca
Answer:
(B) esac

Question 37.
If user enters any value that does not match any of the case value specified, then the control is transferred to the section that has …………….. as its value.
(A) asterisks (**)
(B) semicolons (;;)
(C) commas(,,)
(D) asterisk (*)
Answer:
(D) asterisk (*)

Question 38.
We can assign …………….. value to the variable that accepts the choice in case construct.
(A) numeric
(B) character
(C) string
(D) all of these
Answer:
(D) all of these

Question 39.
In case we assign string values then within the case it should be enclosed between ……………..
(A) colon
(B) comma
(C) double quote
(D) single quote
Answer:
(D) single quote

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 40.
The ……………… test is performed using relational operators
(A) numerical
(B) logical
(C) file
(D) all of these
Answer:
(A) numerical

Question 41.
The options …………….. refers to relational operators.
(A) -ge
(B) ge
(C) greater than
(D) all of these
Answer:
(A) -ge

Question 42.
…………….. operators are used to compare values of two numeric operands.
(A) Relational
(B) Logical
(C) File
(D) All of these
Answer:
(A) Relational

Question 43.
Relational operators are used to compare values of ………………. numeric operands.
(A) one
(B) two
(C) three
(D) any of these
Answer:
(B) two

Question 44.
The options …………….. refers to relational operators.
(A) -gt
(B) -le
(C) -ne
(D) all of these
Answer:
(D) all of these

Question 45.
……………… operators are used to compare values of two numeric operands.
(A) Relational
(B) Logical
(C) File
(D) All of these
Answer:
(A) Relational

Question 46.
………………… is used as”greater than” operator.
(A) -gt
(B) ge
(C) greater than
(D) -ge
Answer:
(A) -gt

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 47.
………………… is used as”greater than equal to” operator.
(A) -ge
(B) gt
(C) greater than equal to
(D) -gt
Answer:
(A) -ge

Question 48.
………………. is used as “less than equal to” operator.
(A) -le
(B) lt
(C) less than equal to
(D) -lt
Answer:
(A) -le

Question 49.
………………. is used as “less than” operator.
(A) -lt
(B) le
(C) less than
(D) -le
Answer:
(A) -lt

Question 50.
……………….. is used as “not equal to” operator.
(A) -ne
(B) =
(C) not equal to
(D) !=
Answer:
(A) -ne

Question 51.
……………….. is used as ” equal to” operator.
(A) -eq
(B) =
(C) equal to
(D) ==
Answer:
(A) -eq

Question 52.
To combine conditions we make use of …………….. operators.
(A) numerical
(B) logical
(C) file
(D) all of these
Answer:
(B) logical

Question 53.
The ……………… test is performed using logical operators
(A) numerical
(B) logical
(C) file
(D) all of these
Answer:
(B) logical

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 54.
………………. is used as “AND” operator.
(A) -a
(B) a
(C) and
(D) -ae
Answer:
(A) -a

Question 55.
………………… is used as “OR” operator.
(A) -eo
(B) o
(C) or
(D) -o
Answer:
(D) -o

Question 56.
…………… is used as “NOT” operator.
(A) -not
(B) not
(C) !=
(D) !
Answer:
(D) !

Question 57.
Minimum conditions that can be combined using -a operator in Ubuntu are ……………..
(A) one
(B) two
(C) three
(D) any of these
Answer:
(B) two

Question 58.
Minimum conditions that can be combined using -o operator in Ubuntu are …………….
(A) one
(B) two
(C) three
(D) any of these
Answer:
(B) two

Question 59.
Minimum conditions that can be combined using ! operator in Ubuntu are …………..
(A) one
(B) two
(C) three
(D) any of these
Answer:
(A) one

Question 60.
…………….. operator is True if both conditions are true, false otherwise.
(A) -a
(B) -o
(C) !
(D) -or
Answer:
(A) -a

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 61.
………………. operator is True if any one condition is true, false only if both conditions are false.
(A) -a
(B) -o
(C) !
(D) -or
Answer:
(B) -o

Question 62.
………….. operator converts true to false and vice versa.
(A) -a
(B) -o
(C) !
(D) -or
Answer:
(C) !

Question 63.
……………. operators allows to check the status of a file.
(A) Relational
(B) Logical
(C) File
(D) All of these
Answer:
(C) File

Question 64.
The …………….. test is performed using file operators.
(A) relational
(B) logical
(C) file
(D) all of these
Answer:
(C) file

Question 65.
By using ……………… operators we can come to know whether a specified name is an ordinary file or a directory.
(A) relational
(B) logical
(C) file
(D) all of these
Answer:
(C) file

Question 66.
……………. operators are used to find out the status of file permissions using them.
(A) Relational
(B) Logical
(C) File
(D) All of these
Answer:
(C) File

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 67.
……………. condition tested using file operators is True if a file with the specified name exists and has size greater than 0.
(A) -r name
(B) -d name
(C) -s name
(D) -f name
Answer:
(C) -s name

Question 68.
……………. condition tested using file operators is True if a file with the specified name exists and is not a directory.
(A) -r name
(B) -d name
(C) -s name
(D) -f name
Answer:
(D) -f name

Question 69.
…………….. condition tested using file operators is True if a directory with the specified name exists.
(A) -r name
(B) -d name
(C) -s name
(D) -f name
Answer:
(B) -d name

Question 70.
…………… condition tested using file operators is True if a file with the specified name exists and the user has read permission on it.
(A) -r name
(B) -w name
(C) -s name
(D) -x name
Answer:
(A) -r name

Question 71.
……………… condition tested using file operators is True if a file with the specified name exists and the user has write permission on it.
(A) -r name
(B) -w name
(C) -s name
(D) -x name
Answer:
(B) -w name

Question 72.
………………. condition tested using file operators is True if a file with the specified name exists and the user has execute permission on it.
(A) -r name
(B) -w name
(C) -s name
(D) -x name
Answer:
(D) -x name

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 73.
How many decision making instructions are available in Linux which can be used in shell script ?
(A) One
(B) Two
(C) Three
(D) Four
Answer:
(D) Four

Question 74.
Which decision making instructions are available in Linux which can be used in shell script ?
(A) if-then-fi
(B) if-then-el if-then-else-fi
(C) case-esac
(D) all of these
Answer:
(D) all of these

Question 75.
If student has greater than 35 percentage display “Result: Pass”. When we want to write a shell script for above task which decision making instructions will be used ?
(A) if-then-fi
(B) if-then-el if-then-else-fi
(C) case-esac
(D) if-then-else-fi
Answer:
(A) if-then-fi

Question 76.
The if statement of Linux is concerned with the …………….. status of a test expression.
(A) exit
(B) append
(C) delete
(D) all of these
Answer:
(A) exit

Question 77.
The …………… status in if statement indicates whether the command was successfully executed or not.
(A) exit
(B) append
(C) delete
(D) all of these
Answer:
(A) exit

Question 78.
The exit status of command is …………… if it has been executed successfully
(A) zero
(B) one
(C) two
(D) none of these
Answer:
(A) zero

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 79.
The exit status of command is ……………… if it has been not executed successfully.
(A) zero
(B) one
(C) two
(D) none of these
Answer:
(B) one

Question 80.
The condition in the shell script is enclosed in a …………… .
(A) paranthesis
(B) angular bracket
(C) curly bracket
(D) square bracket
Answer:
(D) square bracket

Question 81.
There should be ……………… space after opening square bracket and one before closing square bracket in if condition statement.
(A) zero
(B) one
(C) two
(D) none of these
Answer:
(B) one

Question 82.
If the condition of if statement is evaluated to ……………… then statements typed inside then
block will be executed.
(A) True
(B) False
(C) Both (A) and (B)
(D) None of these
Answer:
(A) True

Question 83.
If the condition of if statement is evaluated to …………… then statements typed inside then block will be not be executed.
(A) True
(B) False
(C) Both (A) and (B)
(D) None of these
Answer:
(B) False

Question 84.
If the condition of if statement is evaluated to …………… then statements typed after if will be executed.
(A) True
(B) False
(C) Both (A) and (B)
(D) None of these
Answer:
(B) False

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 85.
The end of the if statement is indicated by …………… statement.
(A) if
(B) fi
(C) end if
(D) else
Answer:
(B) fi

Question 86.
If student has greater than 35 percentage display “Result : Pass” otherwise display “Result: Fail”. When we want to write a shell script for above task which decision making instructions will be used ?
(A) if-then-fi
(B) if-then-el i f-then-else-fi
(C) case-esac
(D) if-then-else-fi
Answer:
(D) if-then-else-fi

Question 87.
…………….. command is used to compares two files.
(A) cmp
(B) cp
(C) compare
(D) verify
Answer:
(A) cmp

Question 88.
If student has greater than 70 percentage display “Result: Distinction”,
If student has percentage between 60 and 70 display “Result : First Class”,
If student has percentage between50 and 60 display “Result : Second Class”,
If student has percentage between 40 and 50 display “Result : Pass Class” otherwise display “Result: Fail”.
When we want to write a shell script for above task which decision making instructions will be used ?
(A) if-then-fi
(B) if-then-el i f-then-else-fi
(C) case-esac
(D) if-then-else-fi
Answer:
(B) if-then-el i f-then-else-fi

Question 89.
…………. command is used in place of square brackets in if statement.
(A) test
(B) cp
(C) cmp
(D) fi
Answer:
(A) test

Question 90.
The ……………… command is used to display long listed details of files and directories.
(A) Is -l
(B) ls -v
(C) ls -r
(D) ls -f
Answer:
(A) Is -l

Question 91.
What is small subscripts within a shell script called ?
(A) For loop
(B) Function
(C) If condition
(D) While loop
Answer:
(B) Function

Question 92.
What is used to make the scripting more modular ?
(A) For loop
(B) Function
(C) If condition
(D) While loop
Answer:
(B) Function

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 93.
What can improve the overall readability of the script ?
(A) Variable
(B) Function
(C) Dollar variable
(D) While loop
Answer:
(B) Function

Question 94.
The function used in shell script return ……………..
(A) a value
(B) a status code
(C) a operator
(D) all of these
Answer:
(B) a status code

Question 95.
Functions …………..
(A) can improve the overall readability of the script.
(B) are used make the scripting more modular.
(C) are small subscripts within a shell script.
(D) all of these
Answer:
(D) all of these

Question 96.
The opening and closing parenthesis after a variable name indicates that it is a ……………
(A) variable
(B) function
(C) dollar variable
(D) while loop
Answer:
(B) function

Question 97.
Function name is followed by ……………… .
(A) square bracket
(B) parenthesis
(C) curly bracket
(D) all of these
Answer:
(B) parenthesis

Question 98.
The process of repeating the same commands number of times is known as …………….
(A) variable
(B) function
(C) conditional Instructs
(D) looping
Answer:
(D) looping

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 99.
How many keywords are provided in Linux to perform repetitive actions ?
(A) One
(B) Two
(C) Three
(D) Four
Answer:
(C) Three

Question 100.
Which is the keyword provided in Linux to perform repetitive actions ?
(A) For
(B) While
(C) Until
(D) All of these
Answer:
(D) All of these

Question 101.
…………….. allows us to specify a list of values in its statement.
(A) For
(B) While
(C) Until
(D) Case -esac
Answer:
(A) For

Question 102.
Directory is compressed using, the ………….. command.
(A) tar
(B) zzip
(C) uzip
(D) none of these
Answer:
(A) tar

Question 103.
We can uncompress the tar file by using the ………….. command.
(A) tar -xvf filename
(B) tar filename
(C) tar filename -xvf
(D) All of these
Answer:
(A) tar -xvf filename

Question 104.
The until loop is similar to the …………….
(A) for ioop
(B) if—else—fl
(C) case — esac
(D) while loop
Answer:
(D) while loop

Question 105.
The until loop executes till the condition is …………..
(A) false
(B) true
(C) none of these
(D) both (A) and (B)
Answer:
(A) false

Question 106.
The while loop executes till the condition is ……………….
(A) false
(B) true
(C) none of these
(D) both (A) and (B)
Answer:
(B) true

GSEB Std 11 Computer MCQ Answers Ch 8 Advanced Scripting

Question 107.
The ………………. executes till the condition is false.
(A) for loop
(B) until loop
(C) case – esac
(D) while loop
Answer:
(B) until loop

Question 108.
The …………….. executes till the condition is true.
(A) for loop
(B) until loop
(C) case – esac
(D) while loop
Answer:
(D) while loop

Question 109.
……………… repeats the set of commands specified between keywords do and done statements as
long as the condition specified as an expression is true.
(A) for loop
(B) until loop
(C) case — esac
(D) while loop
Answer:
(D) while loop

Question 110.
…………… [ test condition ]

do
command or set of commands
done

What will come in the blank ?
(A) for
(B) until
(C) case
(D) while
Answer:
(D) while

Question 111.
……………. control-variable in value1,value2,value3

...
do
command 1
command 2
command 3
done

What will come in the blank ?
(A) for
(B) until
(C) case
(D) while
Answer:
(A) for

Leave a Comment

Your email address will not be published. Required fields are marked *