GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Well-structured Std 11 Computer Textbook MCQ Answers and Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting can serve as a valuable review tool before computer exams.

GSEB Std 11 Computer Chapter 7 MCQ Vim Editor and Basic Scripting

Question 1.
Ubuntu Linux commands are executed ……………..
(A) one at a time.
(B) two at a time
(C) many at a time
(D) none of these
Answer:
(A) one at a time.

Question 2.
In Ubuntu Linux multiple commands can be executed by using ……………
(A) pipes
(B) conditions
(C) filter
(D) all of these
Answer:
(A) pipes

Question 3.
The process of executing multiple commands using pipes is ……………..
(A) smart work
(B) tedious
(C) perfect work
(D) none of these
Answer:
(B) tedious

Question 4.
A better way of executing multiple commands at one go is to ……………..
(A) use pipe
(B) type the sequence of commands in a text file.
(C) use @ symbol
(D) both (A) and (B)
Answer:
(B) type the sequence of commands in a text file.

Question 5.
After typing the sequence of commands in a text file, this text file should be given ……………. execution.
(A) kernel
(B) linux shell
(C) interpreter
(D) compiler
Answer:
(B) linux shell

Question 6.
The …………….. will execute all the commands available within the text file in the specified sequence.
(A) kernel
(B) linux shell
(C) interpreter
(D) compiler
Answer:
(B) linux shell

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 7.
…………… assists us in writing the shell script .
(A) Terminal
(B) Application
(C) Editor
(D) Both (A) and (B)
Answer:
(C) Editor

Question 8.
…………….. can be defined as series of commands written in a plain text file.
(A) Pipe
(B) Editor
(C) Shell script
(D) Kernel
Answer:
(C) Shell script

Question 9.
A shell script can be defined as ………………
(A) series of commands written in a plain text file.
(B) condition for commands written in a plain text file.
(C) excel file
(D) none of these
Answer:
(A) series of commands written in a plain text file.

Question 10.
The ……………… are commonly used by the users to perform routine individual tasks and system administration.
(A) pipe
(B) editor
(C) shell script
(D) kernel
Answer:
(C) shell script

Question 11.
The shell scripts are commonly used by the ……………… to perform routine individual tasks and system administration.
(A) users
(B) designers
(C) analysts
(D) all of these
Answer:
(A) users

Question 12.
The shell scripts are commonly used by the users to perform ………………. .
(A) creating users
(B) routine individual tasks
(C) system administration.
(D) both (B) and (C)
Answer:
(D) both (B) and (C)

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 13.
…………… command is used to create a file.
(A) Cat
(B) Man
(C) Echo
(D) Pwd
Answer:
(A) Cat

Question 14.
What is the use of cat command ?
(A) Create a file
(B) Create directory
(C) Change directory
(D) None of these
Answer:
(A) Create a file

Question 15.
…………….. command is used to create a file.
(A) Cat
(C) Vi
(B) Vi filename
(D) All of these
Answer:
(D) All of these

Question 16.
The cat command although it allows us to create a file is not a ……………….. option to use when creating a shell script.
(A) good
(B) worthy
(C) possible
(D) practical
Answer:
(A) good

Question 17.
The ……………… command although it allows us to create a file is not a good option to use when creating a shell script.
(A) cat
(B) man
(C) echo
(D) pwd
Answer:
(A) cat

Question 18.
Which is the example of text editor ?
(A) Pico
(B) Nano
(C) Vi or vim
(D) All of these
Answer:
(D) All of these

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 19.
Which types of text editor available to serve the purpose of writing shell scripts ?
(A) vi & vim
(B) emacs, nano
(C) pico, ed
(D) All of these
Answer:
(D) All of these

Question 20.
Which types of graphical editor available to serve the purpose of writing shell scripts ?
(A) Gedit
(B) Kwriter
(C) Both (A) and (B)
(D) None of these
Answer:
(C) Both (A) and (B)

Question 21.
To execute a command, user types it on ………………… prompt and press the Enter key.
(A) command
(B) graphics
(C) (A) or (B)
(D) none of these
Answer:
(A) command

Question 22.
In how many modes Vim editor works ?
(A) Four
(B) Three
(C) Two
(D) One
Answer:
(B) Three

Question 23.
In Linux, the output of the command is displayed on the ……………….
(A) editor
(B) graph
(C) screen
(D) shell script
Answer:
(C) screen

Question 24.
Which graphical editor is available with GNOME desktop environment ?
(A) Gedit
(B) Kwrite
(C) editG
(D) writeK
Answer:
(A) Gedit

Question 25.
Which desktop environment provides Gedit graphical editor ?
(A) KDE
(B) DEK
(C) NOMEG
(D) GNOME
Answer:
(D) GNOME

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 26.
Which graphical editor is available with KDE desktop environment ?
(A) Gedit
(B) Kwrite
(C) editG
(D) writeK
Answer:
(B) Kwrite

Question 27.
Which desktop environment provides Kwrite graphical editor ?
(A) KDE
(B) DEK
(C) NOMEG
(D) GNOME
Answer:
(A) KDE

Question 28.
What is Full form of Vim ?
(A) Vi Improved
(B) Virtual Important Machine
(C) Vi Independent
(D) Very Improved
Answer:
(A) Vi Improved

Question 29.
Vim is written by whom ?
(A) Robert Williams
(B) Bram Moolenaar
(C) Brath Moolenaar
(D) Bram Molth
Answer:
(B) Bram Moolenaar

Question 30.
When was Vim publicly released ?
(A) 1992
(B) 1994
(C) 1995
(D) 1991
Answer:
(D) 1991

Question 31.
Vim is enhanced version of which editor distributed with most UNIX systems ?
(A) ed
(B) pico
(C) nano
(D) vi
Answer:
(D) vi

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 32.
Which is a highly configurable text editor built to enable efficient text editing ?
(A) ed
(B) pico
(C) nano
(D) Vim
Answer:
(D) Vim

Question 33.
Which editor can be used from both a command line interface and as a standalone in a graphical user interface. ?
(A) ed
(B) pico
(C) nano
(D) Vim
Answer:
(D) Vim

Question 34.
From where can the Vim editor be used ?
(A) Command line interface
(B) As a standalone in a graphical user interface
(C) Kernel
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 35.
Which editor is available with almost all Unix and Linux flavours ?
(A) edit
(B) pee
(C) nona
(D) Vim
Answer:
(D) Vim

Question 36.
To work with the Vim editor, we will have to ………………. it first.
(A) initiate
(B) compile
(C) interprete
(D) none of these
Answer:
(A) initiate

Question 37.
In how many ways can Vim editor be opened ?
(A) Two
(B) Three
(C) Four
(D) Five
Answer:
(A) Two

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 38.
Which method is used to open Vim editor ?
(A) Type vi at the prompt and press Enter key.
(B) Type vi followed by a file name and press Enter key.
(C) Type filename and press Enter key
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 39.
When a new file is opened in Vim it is filled with ………………… tildes (~) on the left side of the screen.
(A) @
(B) #
(C) ~(tilde)
(D) $
Answer:
(C) ~(tilde)

Question 40.
When a new file is opened in Vim ………………. symbol indicates that the lines are yet to be used by the editor.
(A) @
(B) #
(C) ~(tilde)
(D) $
Answer:
(C) ~(tilde)

Question 41.
When a new file is opened in Vim the ……………. appears in the top left corner of the screen.
(A) $
(B) command line
(C) @
(D) cursor
Answer:
(D) cursor

Question 42.
When a new file is opened in Vim the cursor appears in the top …………….. of the screen.
(A) left corner
(B) center
(C) right corner
(D) none of these
Answer:
(A) left corner

Question 43.
On the which line is some text visible when a new file is opened in Vim ?
(A) Last
(B) First
(C) Fifth
(D) Seventh
Answer:
(A) Last

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 44.
What is the last line of a new file opened in Vim known as ?
(A) Command line
(B) Command prompt
(C) Shell
(D) None of these
Answer:
(A) Command line

Question 45.
Which line is known as command line when a new file is opened in Vim ?
(A) Last
(B) First
(C) Fifth
(D) Seventh
Answer:
(A) Last

Question 46.
Where is the name of the file along with the information about the total number of lines and columns within the file displayed ?
(A) Command line
(B) Command prompt
(C) Shell
(D) None of these
Answer:
(A) Command line

Question 47.
What is displayed on the command line ?
(A) The name of the file
(B) The name of the file along with the information about the total number of lines
(C) The name of the file along with the information about the total number of lines and columns within the file
(D) None of these
Answer:
(C) The name of the file along with the information about the total number of lines and columns within the file

Question 48.
How many modes are there in Vim editor ?
(A) Three
(B) Two
(C) Four
(D) One
Answer:
(A) Three

Question 49.
Which are the modes available in Vim editor ?
(A) Command
(B) Insert
(C) Last line
(D) All of these
Answer:
(D) All of these

Question 50.
In which mode will the editor be opened, when we first start editing a file using the Vim editor ?
(D) All of these
(B) Insert
(C) Last line
(D) All of these
Answer:
(D) All of these

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 51.
By default the Vim editor will start in which mode ?
(A) Command
(B) Insert
(C) Last line
(D) All of these
Answer:
(A) Command

Question 52.
What can we do immediately after being in command mode ?
(A) We can’t insert text
(B) We can insert text
(C) We can delete text
(D) None of these
Answer:
(A) We can’t insert text

Question 53.
Which command is to be issued to insert the text in the file ?
(A) Insert (i)
(B) Append (a)
(C) Open (o)
(D) Any of these
Answer:
(D) Any of these

Question 54.
Which command is to be issued to be in the insert mode of Vim editor ?
(A) Insert (i)
(B) Append (a)
(C) Open (o)
(D) Any of these
Answer:
(D) Any of these

Question 55.
What is an extension to the command mode known as ?
(A) Visual mode
(B) Insert
(C) Last line
(D) None of these
Answer:
(A) Visual mode

Question 56.
Which mode is a flexible and easy way to select a piece of text from the file ?
(A) Visual mode
(B) Insert
(C) Last line
(D) None of these
Answer:
(A) Visual mode

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 57.
Which mode is the only way to select a block of text that needs to be modified ?
(A) Visual mode
(B) Insert
(C) Last line
(D) None of these
Answer:
(A) Visual mode

Question 58.
Visual mode is ……………..
(A) is a flexible and easy way to select a piece of text from the file
(B) is the only way to select a block of text that needs to be modified.
(C) is an extension to the command mode
(D) all of these
Answer:
(D) all of these

Question 59.
Visual mode ………………
(A) is a flexible and easy way to select a piece of text from the file
(B) is the only way to select a block of text that needs to be modified.
(C) is the most difficult mode
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 60.
Which character switches to the visual mode allowing to manipulate characters ?
(A) v
(B) V
(C) CTRL + v
(D) d
Answer:
(A) v

Question 61.
Which character switches to the visual mode allowing to manipulate lines ?
(A) v
(B) V
(C) CTRL + v
(D) d
Answer:
(B) V

Question 62.
Which character switches to block visual mode allowing to manipulate rectangular blocks of text ?
(A) v
(B) V
(C) CTRL + v
(D) d
Answer:
(C) CTRL + v

Question 63.
What can be done in insert mode ?
(A) We can type text in file
(B) Navigate within the file
(C) None of these
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 64.
How can we toggle between the command mode and the insert mode ?
(A) By pressing the SHIFT key
(B) By pressing the ESC key
(C) By pressing the TAB key
(D) By pressing the CTRL key
Answer:
(B) By pressing the ESC key

Question 65.
Which command is used to insert text after the current cursor position ?
(A) a
(B) i
(C) A
(D) I
Answer:
(A) a

Question 66.
Which command is used to insert text before the current cursor position ?
(A) a
(B) i
(C) A
(D) I
Answer:
(A) a

Question 67.
Which command is used to append text after at the end of the current line ?
(A) a
(B) i
(C) A
(D) I
Answer:
(C) A

Question 68.
Which command is used to insert text from the beginning of a line ?
(A) a
(B) i
(C) A
(D) I
Answer:
(D) I

Question 69.
Which command is used to insert a new line above the current cursor position ?
(A) O
(B) o
(C) A
(D) I
Answer:
(A) O

Question 70.
Which command is used to insert a new line below the current cursor position ?
(A) O
(B) o
(C) A
(D) I
Answer:
(B) o

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 71.
To perform which operation normally is the last line mode used for ? To perform operations like quitting the Vim session or saving a file.
(A) Quitting the Vim session
(B) Saving a file
(C) Type the text
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 72.
Which mode is normally used to perform operations like quitting the Vim session or saving a file ?
(A) Visual mode
(B) Insert
(C) Last line
(D) None of these
Answer:
(C) Last line

Question 73.
To go to the last line mode we first need to be in which mode ?
(A) Command mode
(B) Insert
(C) Last line
(D) None of these
Answer:
(A) Command mode

Question 74.
By pressing which key can we go from command mode to the last line mode ?
(A) Colon(:)
(B) ESC
(C) TAB
(D) $
Answer:
(A) Colon(:)

Question 75.
After pressing the colon(:) key, a colon character is seen at the beginning of the last line of Vim editor window with cursor blinking near it. What does this indicate ?
(A) The editor is ready for accepting a “last line command”
(B) The editor is ready to type the text
(C) The editor is ready to edit the text
(D) The editor is ready to delete the text
Answer:
(A) The editor is ready for accepting a “last line command”

Question 76.
What is seen on the last line of Vim editor window after pressing the colon(:) key ?
(A) A colon character is seen at the beginning of the last line of Vim editor window.
(B) A colon character is seen at the beginning of the last line of Vim editor window with cursor blinking near it.
(C) A $ prompt is seen at the beginning of the last line of Vim editor window with cursor blinking near it.
(D) a $ prompt is seen at the beginning of the last line of Vim editor window.
Answer:
(B) A colon character is seen at the beginning of the last line of Vim editor window with cursor blinking near it.

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 77.
By pressing which key twice can we toggle back to the command mode from the last line mode ?
(A) Colon(:)
(B) ESC
(C) TAB
(D) $
Answer:
(B) ESC

Question 78.
How can we toggle back to the command mode from the last line mode ?
(A) By pressing the ESC key twice
(B) By pressing the [Backspace] key until the initial character is gone along with all the characters that we had typed
(C) By pressing the TAB key twice
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 79.
Which method is used to create a file in Vim editor ?
(A) Type vi followed by a file name and press Enter key
(B) Type vi at the prompt and press Enter key
(C) Cat filename
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 80.
Which command is used to create a file in Vim editor ?
(A) $vi filename
(B) $vi
(C) Scat filename
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 81.
Which command is used to get into insert mode ?
(A) a
(B) i
(C) s
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 82.
Which command is used to save a file in Vim editor ?
(A) :wq
(B) :s
(C) :fs
(D) :xy
Answer:
(A) :wq

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 83.
To which mode do we need to switch to form the insert mode to save a file in Vim editor ?
(A) Last line
(B) Execute
(C) Delete
(D) Modify
Answer:
(A) Last line

Question 84.
Which command is used to save a file and remain in editing mode in Vim editor ?
(A) :w
(B) :wq
(C) :q
(D) :q!
Answer:
(A) :w

Question 85.
Which command is used to save a file and quit editing mode in Vim editor ?
(A) 😡
(B) :wq
(C) :q
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 86.
Which command is used to quit editing mode when no changes are made in the file in Vim editor ?
(A) :w
(B) :wq
(C) :q
(D) :q!
Answer:
(C) :q

Question 87.
Which command is used to quit editing mode without saving changes made in the file in Vim editor ?
(A) :w
(B) :wq
(C) :q
(D) :q!
Answer:
(D) :q!

Question 88.
Which command is used to save existing file with new name and continue editing it under the new file name in Vim editor ?
(A) :w
(B) :wq
(C) :q
(D) :saveas Filename
Answer:
(D) :saveas Filename

Question 89.
When Vim editor is opened without typing file name initially, the text will be directly stored in the ……………….
(A) system buffer
(B) hard disk
(C) register
(D) bus
Answer:
(A) system buffer

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 90.
When Vim editor is opened without typing file name initially, the text will be directly stored in the ………………
(A) main memory
(B) hard disk
(C) register
(D) bus
Answer:
(A) main memory

Question 91.
The arrow keys are used to move the ………………. in up,down,left and right direction.
(A) cursor
(B) window
(C) screen
(D) none of these
Answer:
(A) cursor

Question 92.
The arrow keys are used to move the cursor in ……………. direction.
(A) up and down
(B) left and right
(C) digonally
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 93.
In file in Vim editor which command moves cursor to left ?
(A) h
(B) l
(C) j
(D) k
Answer:
(A) h

Question 94.
In file in Vim editor which command moves cursor to right ?
(A) h
(B) l
(C) j
(D) k
Answer:
(B) l

Question 95.
In file in Vim editor which command moves cursor to down ?
(A) h
(B) l
(C) j
(D) k
Answer:
(C) j

Question 96.
In file in Vim editor which command moves cursor to up ?
(A) h
(B) l
(C) j
(D) k
Answer:
(D) k

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 97.
In file in Vim editor which command moves cursor to right one space ?
(A) spacebar
(B) l
(C) j
(D) k
Answer:
(A) spacebar

Question 98.
In Vim editor which command moves cursor down in first column ?
(A) –
(B) +
(C) *
(D) /
Answer:
(A) –

Question 99.
In Vim editor which command moves cursor up in first column ?
(A) –
(B) +
(C) *
(D) /
Answer:
(B) +

Question 100.
In Vim editor which command scrolls down one half of a page ?
(A) CTRL + d
(B) CTRL + u
(C) CTRL + f
(D) CTRL + b
Answer:
(A) CTRL + d

Question 101.
In Vim editor which command scrolls up one half of a page ?
(A) CTRL + d
(B) CTRL + u
(C) CTRL + f
(D) CTRL + b
Answer:
(B) CTRL + u

Question 102.
In Vim editor which command scrolls forward one page ?
(A) CTRL + d
(B) CTRL + u
(C) CTRL + f
(D) CTRL + b
Answer:
(C) CTRL + f

Question 103.
In Vim editor which command scrolls back one page ?
(A) CTRL + d
(B) CTRL + u
(C) CTRL + f
(D) CTRL + b
Answer:
(D) CTRL + b

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 104.
In Vim editor which command moves the cursor to the middle of the page ?
(A) M
(B) H
(C) L
(D) $
Answer:
(A) M

Question 105.
In Vim editor which command moves the cursor to the top of the page ?
(A) M
(B) H
(C) L
(D) $
Answer:
(B) H

Question 106.
In Vim editor which command moves the cursor to the bottom of the page ?
(A) M
(B) H
(C) L
(D) $
Answer:
(C) L

Question 107.
In Vim editor which command moves the cursor to the end of line ?
(A) M
(B) H
(C) L
(D) $
Answer:
(D) $

Question 108.
In Vim editor which command moves the cursor to the beginmng of next sentence?
(A) )
(B) (
(C) G
(D) W
Answer:
(A) )

Question 109.
In Vim editor which command moves the cursor to the beginmng of current sentence?
(A) )
(B) (
(C) G
(D) W
Answer:
(B) (

Question 110.
In Vim editor which command moves the cursor to end of file ?
(A) )
(B) (
(C) G
(D) W
Answer:
(C) G

Question 111.
In Vim editor which command moves the cursor one word at a time?
(A) )
(B) (
(C) G
(D) W
Answer:
(D) W

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 112.
In Vim editor which command moves the cursor back a word at a time.?
(A) Nb
(B) e
(C) c
(D) B
Answer:
(D) B

Question 113.
In Vim editor which command moves the cursor back a word at a time ?
(A) Nb
(B) e
(C) b
(D) c
Answer:
(C) b

Question 114.
In Vim editor which command moves the cursor back a word at a time ?
(A) b
(B) B
(C) e
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 115.
In Vim editor which command moves the cursor back by N number of words ?
(A) Nb
(B) e
(C) b
(D) B
Answer:
(A) Nb

Question 116.
In Vim editor which command moves the cursor back to end of word ?
(A) Nb
(B) E
(C) b
(D) B
Answer:
(B) E

Question 117.
In Vim editor which command moves to first line of file ?
(A) Nb
(B) gg
(C) b
(D) B
Answer:
(B) gg

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 118.
In Vim editor which command moves to the beginning of the line ?
(A) Nb
(B) gg
(C) b
(D) 0
Answer:
(D) 0

Question 119.
……………….. the document is one of the most common operations that a user would perform once the document is created.
(A) Skipping
(B) Editing
(C) Compiling
(D) Inserting
Answer:
(B) Editing

Question 120.
A user needs to toggle between the ……………… and the ……………… mode when we edit a document.
(A) command, insert
(B) edit, delete
(C) command, last line
(D) Insert, delete
Answer:
(A) command, insert

Question 121.
In Vim editor which command is used to undo last change ?
(A) U
(B) u
(C) C
(D) dd
Answer:
(B) u

Question 122.
In Vim editor which command is used to undo all changes to entire line ?
(A) U
(B) u
(C) C
(D) dd
Answer:
(A) U

Question 123.
In Vim editor which command is used to Delete single line ?
(A) U
(B) u
(C) C
(D) dd
Answer:
(D) dd

Question 124.
In Vim editor which command is used to delete N number of lines ?
(A) U
(B) u
(C) C
(D) Ndd
Answer:
(D) Ndd

Question 125.
In Vim editor which command is used to delete contents of line after cursor ?
(A) D
(B) dd
(C) C
(D) Ndd
Answer:
(A) D

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 126.
In Vim editor which command is used to delete contents of line after cursor and insert new text ?
(A) D
(B) dd
(C) C
(D) Ndd
Answer:
(C) C

Question 127.
In Vim editor which command is used to delete one word ?
(A) cw
(B) Ndw
(C) dw
(D) Ndd
Answer:
(C) dw

Question 128.
In Vim editor which command is used to delete N number of words ?
(A) cw
(B) Ndw
(C) dw
(D) Ndd
Answer:
(B) Ndw

Question 129.
In Vim editor which command is used to change word ?
(A) cw
(B) Ndw
(C) dw
(D) Ndd
Answer:
(A) cw

Question 130.
In Vim editor which command is used to delete the character under the cursor ?
(A) R
(B) r
(C) x
(D) X
Answer:
(C) x

Question 131.
In Vim editor which command is used to delete the character before the cursor ?
(A) R
(B) r
(C) x
(D) X
Answer:
(D) X

Question 132.
In Vim editor which command is used to replace single character ?
(A) R
(B) r
(C) x
(D) X
Answer:
(B) r

Question 133.
In Vim editor which command is used to overwrite characters from cursor onward ?
(A) R
(B) r
(C) x
(D) X
Answer:
(A) R

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 134.
In Vim editor which command is used to overwrite substitute one character under cursor and continue to insert ?
(A) s
(B) S
(C) x
(D) X
Answer:
(A) s

Question 135.
In Vim editor which command is used to overwrite substitute entire line and begin to insert at beginning of line ?
(A) s
(B) S
(C) x
(D) X
Answer:
(B) S

Question 136.
In Vim editor which command is used to change case of individual character ?
(A) . (dot)
(B) ~
(C) @
(D) %
Answer:
(B) ~

Question 137.
In Vim editor which command is used to repeat last command action ?
(A) . (dot)
(B) ~
(C) @
(D) %
Answer:
(A) . (dot)

Question 138.
Vim editor allows to copy text ……………
(A) from file into temporary buffer
(B) from temporary buffer into file
(C) from file into processor
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 139.
Buffer which acts like temporary memory is known as …………..
(A) clipboard
(B) hard disk
(C) smart memory
(D) pen drive
Answer:
(A) clipboard

Question 140.
In Vim editor which command is used to place (paste) contents of buffer after current line defined by current cursor position ?
(A) p
(B) yy
(C) Nyy
(D) x
Answer:
(A) p

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 141.
In Vim editor which command is used to copy N lines from current cursor position into the buffer ?
(A) p
(B) yy
(C) Nyy
(D) x
Answer:
(C) Nyy

Question 142.
In Vim editor which command is used to copy single line from current cursor position into the buffer ?
(A) p
(B) yy
(C) Nyy
(D) Yy
Answer:
(D) Yy

Question 143.
In Vim editor which command is used copy single line (defined by current cursor position) into the buffer ?
(A) p
(B) yy
(C) Nyy
(D) x
Answer:
(B) yy

Question 144.
The Vim editor allows to ……………..
(A) search text or a regular expression within the file
(B) substitution of a word in place of another word
(C) none of these
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 145.
In Vim editor which command is used to search for text in a forward direction ?
(A) /
(B) ?
(C) n
(D) SHIFT + n
Answer:
(A) /

Question 146.
In Vim editor which command is used to search for text in a backward direction ?
(A) /
(B) ?
(C) n
(D) SHIFT + n
Answer:
(B) ?

Question 147.
In Vim editor which command is used to search again in the same direction ?
(A) /
(B) ?
(C) n
(D) SHIFT + n
Answer:
(C) n

Question 148.
In Vim editor which command is used to search again in the opposite direction ?
(A) /
(B) ?
(C) n
(D) SHIFT + n
Answer:
(D) SHIFT + n

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 149.
Which of the following syntax is used to substitute all occurrences of phrase 1 with phrase2 in the entire file ?
(A) :%s/phrasel/phrase2/g
(B) :%s/phrasel/phrase2/gc
(C) :s/phrasel/phrase2/g
(D) :s/phrasel/phrase2/gc
Answer:
(A) :%s/phrasel/phrase2/g

Question 150.
Which of the following syntax is used to substitute all occurrences of phrase 1 with phrase2 in the current line ?
(A) :%s/phrasel/phrase2/g
(B) :%s/phrasel/phrase2/gc
(C) :s/phrasel/phrase2/g
(D) :s/phrasel/phrase2/gc
Answer:
(C) :s/phrasel/phrase2/g

Question 151.
Which of the following syntax is used to substitute first occurrence of phrase1 with phrase2 in the current line ?
(A) :%s/phrasel/phrase2/g
(B) :s/phrasel/phrase2
(C) :s/phrasel/phrase2/g
(D) :s/phrasel/phrase2/gc
Answer:
(B) :s/phrasel/phrase2

Question 152.
To execute the Linux commands from within the Vim editor type …………….. symbol before the command.
(A) %
(B) ! (exclamation)
(C) ?
(D) #
Answer:
(B) ! (exclamation)

Question 153.
What allows us to execute more than one command at one go in a better way ?
(A) Shell script
(B) Variable
(C) For loop
(D) Block
Answer:
(A) Shell script

Question 154.
What is defined as “Set of commands written in plain text file that performs a designated task in a controlled order.” ?
(A) Shell script
(B) Variable
(C) Comment
(D) Block
Answer:
(A) Shell script

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 155.
Shell script can be defined as ………………
(A) set of commands written in plain text file that performs a designated task in a controlled order.
(B) a word which is defined to perform certain action.
(C) memory location which has name
(D) none of these
Answer:
(A) set of commands written in plain text file that performs a designated task in a controlled order.

Question 156.
Is it necessary to provide sh as extension to shell script ?
(A) Yes, it is compulsory to provide sh extension to shell script
(B) No, it is not compulsory to provide sh extension to shell script
(C) No, it is not compulsory, it is good practice to provide sh extension to shell script
(D) None of these
Answer:
(C) No, it is not compulsory, it is good practice to provide sh extension to shell script

Question 157.
A comment in Ubuntu Linux is begins with which symbol ?
(A) #
(B) ?
(C) $
(D) @
Answer:
(A) #

Question 158.
……………. in the script is not executed; they are messages that help user understand the usage or meaning of the script.
(A) Shell script
(B) Variable
(C) Comment
(D) Block
Answer:
(C) Comment

Question 159.
……………. in the script is not executed.
(A) Shell script
(B) Variable
(C) Comment
(D) Block
Answer:
(C) Comment

Question 160.
Which command clears the screen contents before giving the output of the script ?
(A) Echo
(B) Clear
(C) Cut
(D) Clean
Answer:
(B) Clear

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 161.
Which command displays a message on the screen ?
(A) Echo
(B) Ego
(C) Disp
(D) Display
Answer:
(A) Echo

Question 162.
Which command gives the name and some additional details of the user currently logged into the system ?
(A) who am i
(B) who
(C) pwd
(D) cal
Answer:
(A) who am i

Question 163.
Which command is used to execute the script use sh or bash command?
(A) sh
(B) bash
(C) ksh
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 164.
Which command is used to set the desired privileges ?
(A) Chmod
(B) Changem
(C) Chmode
(D) Chprivilege
Answer:
(A) Chmod

Question 165.
Which command is used to make file executable ? (Consider name of file to be scriptl.sh)
(A) Chmod +x scriptl.sh
(B) Changem +x scriptl.sh
(C) Chmode +x scriptl.sh
(D) Chprivilege +x scriptl.sh
Answer:
(A) Chmod +x scriptl.sh

Question 166.
For a script to be executed it needs to have …………….. permission.
(A) execute
(B) read
(C) write
(D) all of these
Answer:
(A) execute

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 167.
Which command is called a filter command?
(A) Who
(B) Clear
(C) Echo
(D) Cut
Answer:
(D) Cut

Question 168.
Two command can be joined using which symbol ?
(A) | (pipe)
(B) # (hash)
(C) @ (at the rate)
(D) % (percentage)
Answer:
(A) | (pipe)

Question 169.
To make sure that the contents within the double quotes after the echo command are not treated as message we enclose them in ………………
(A) single quotes
(B) double quotes
(C) # (hash)
(D) back quotes ( ‘ ‘ )
Answer:
(D) back quotes ( ‘ ‘ )

Question 170.
Which command is used to display date on the screen ?
(A) Date
(B) Datetime
(C) Cal
(D) Cd
Answer:
(A) Date

Question 171.
The back quotes are printed on the key with ……………… sign on the keyboard.
(A) ~ (tilde)
(B) single quotes
(C) @(at the rate)
(D) % (percentage)
Answer:
(A) ~ (tilde)

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 172.
What is used to create a new command using multiple set of commands in Ubuntu Linux ?
(A) Shell Script
(B) For loop
(C) If condition
(D) While loop
Answer:
(A) Shell Script

Question 173.
What is used for automating many aspects of computer maintenance, for example create 1 accounts; delete all size 0 files, installation of new software etc in Ubuntu Linux ?
(A) Shell Script
(B) Shell environment variables
(C) Shell Constants
(D) Shell Variables
Answer:
(A) Shell Script

Question 174.
Can Shell Script be used for data backup in Ubuntu Linux ?
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(A) Yes

Question 175.
Which is a very powerful tool of Linux ?
(A) Shell Script
(B) Shell environment variables
(C) Shell Constants
(D) Shell Variables
Answer:
(A) Shell Script

Question 176.
Who has almost all the capabilities of any higher level programming language in Linux ?
(A) Shell Script
(B) Shell arithmatic
(C) Shell Constants
(D) Functions
Answer:
(A) Shell Script

Question 177.
Which task should be done using the shell scripts ?
(A) Repetitive
(B) Non Repetitive
(C) Sequential
(D) Non – Sequential
Answer:
(A) Repetitive

Question 178.
Which type of values can be assigned to a variable ?
(A) Strings
(B) Numeric
(C) Shell script
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 179.
What is the full form of expr ?
(A) Exception
(B) Expresso
(C) Express
(D) Expression
Answer:
(D) Expression

Question 180.
What are the contents written after expr are assumed to be ?
(A) Operands of an expression
(B) Operators of an expression
(C) Boolean expression
(D) Both (A) and (B)
Answer:
(D) Both (A) and (B)

Question 181.
While writing a numerical expression in Linux should there be one space between operator and operands ?
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(A) Yes

Question 182.
While writing a numerical expression in Linux should there be no space between operator and operands ?
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(B) No

Question 183.
While writing a numerical expression in Linux should there be no space before and after the assignment operator (=) ?
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(A) Yes

Question 184.
While writing a numerical expression in Linux should there be one space before and after the assignment operator (=) ?
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(B) No

Question 185.
Which operator is used for addition in Linux?
(A) +
(B) ++
(C) =+
(D) All of these
Answer:
(A) +

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 186.
WTiich operator is used for subtraction in Linux ?
(A) –
(B) % –
(C) = –
(D) All of these
Answer:
(A) –

Question 187.
Which operator is used for multiplication in Linux ?
(A) *
(B) **
(C) =*
(D) All of these
Answer:
(A) *

Question 188.
Which operator is used for division in Linux ?
(A) /
(B) \
(C) = \
(D) All of these
Answer:
(A) /

Question 189.
Which operator is used for modular division in Linux ?
(A) /
(B) \
(C) %
(D) All of these
Answer:
(C) %

Question 190.
The numerical expressions are evaluated as per the general norms of ……………..
(A) mathematics
(B) science
(C) commerce
(D) none of these
Answer:
(A) mathematics

Question 191.
In case of tie between operators of same priority, preference is given to the operator which occurs ……………
(A) last
(B) third
(C) second
(D) first
Answer:
(D) first

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 192.
To force one operation to be performed earlier than the other, we can enclose the operation in ……………..
(A) curly braces
(B) rectuangular brackets
(C) parenthesis
(D) angular brackets
Answer:
(C) parenthesis

Question 193.
Which operator in Linux has to be prefixed with \ (backslash) character ?
(A) +
(B) –
(C) *
(D) %
Answer:
(C) *

Question 194.
Multiplication operator has to be prefixed using …. character .
(A) \ (forward slash)
(B) \ (backslash)
(C) %
(D) .(underscore)
Answer:
(B) \ (backslash)

Question 195.
Why should * be prefixed by \ (backslash) character in Linux ?
(A) Otherwise the shell will treat the (*) symbol as a wildcard character.
(B) Otherwise the shell will treat the (*) symbol as a evaluating character.
(C) Otherwise the shell will treat the (*) symbol as a first operation to be performed.
(D) Otherwise the shell will treat the (*) symbol as a last operation to be performed.
Answer:
(A) Otherwise the shell will treat the (*) symbol as a wildcard character.

Question 196.
Which option of tr command is used to squeeze multiple spaces of output to single space ?
(A) -a
(B) -c
(C) -d
(D) -s
Answer:
(A) -a

Question 197.
Which column of date command displays – year ?
(A) 3
(B) 4
(C) 5
(D) 6
Answer:
(D) 6

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 198.
Which command is used to display the year from date command ?
(A) date | tr -s ‘ ‘ | cut -d ” ” -f 6
(B) date | tr -s ‘ ’ | cut -d ” ” -f 4
(C) date | tr -s ‘ ‘ | cut -d ” ” -f 5
(D) date | tr -s ‘ ‘ | cut -d ” ” -f 3
Answer:
(A) date | tr -s ‘ ‘ | cut -d ” ” -f 6

Question 199.
Which command is used to assign value to variables defined in the shell script ?
(A) Read
(B) Echo
(C) Clear
(D) None of these
Answer:
(A) Read

Question 200.
Which command expects the user to key in the data on the standard input device ?
(A) Read
(B) Echo
(C) Clear
(D) None of these
Answer:
(A) Read

Question 201.
In case we press Enter key without typing anything the script will assign ……………… value to the variable
(A) ELEVEN
(B) ONE
(C) ZERO
(D) NULL
Answer:
(D) NULL

Question 202.
Which option instructs the echo command not to print a new line after the message is displayed ?
(A) -o
(B) -s
(C) -n
(D) -d
Answer:
(C) -n

Question 203.
What is the default action of the echo command after displaying the message passed to it as an argument ?
(A) Does not insert a new line
(B) Inserts a new line
(C) Inserts a null character
(D) Inserts zero
Answer:
(B) Inserts a new line

Question 204.
Which command is used to display the total number of lines in that file ?
(A) Filename | wc -l
(B) Filename | wc
(C) Filename | wc -w
(D) Filename | wc -c
Answer:
(A) Filename | wc -l

Question 205.
A variable name can consist of …………….
(A) alphabets
(B) digitsr
(C) an underscore
(D) all of these
Answer:
(D) all of these

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 206.
Which special character is allowed as part of variable name ?
(A) Backslash
(B) Percentage
(C) Dollar
(D) Underscore
Answer:
(D) Underscore

Question 207.
The first character of a variable name must be ……………. .
(A) an alphabet
(B) an underscore
(C) a dollar
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 208.
If the shell is unable to understand a word as a variable it will interpret it as a Linux …………….
(A) command
(B) expression
(C) environment variable
(D) none of these
Answer:
(A) command

Question 209.
……………. are entities wherein we can store or edit a value in Linux.
(A) Variables
(B) Shell script
(C) Shell arithmatic
(D) None of these
Answer:
(A) Variables

Question 210.
The value stored in the variable can also be ………………….. as per users need.
(A) reused
(B) changed
(C) none of these
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 211.
A variable when used in a shell script allows us to …………….
(A) Assign a value to it
(B) Accept its value from the user
(C) none of these
(D) both (A) and (B)
Answer:
(D) both (A) and (B)

Question 212.
Which command is used to display the value assigned to the variable ?
(A) Display
(B) Read
(C) Clear
(D) Echo
Answer:
(D) Echo

Question 213.
Which symbol preceding the variable name instructs the shell to extract the value stored or assigned in the variable ?
(A) $
(B) #
(C) @
(D) %
Answer:
(A) $

GSEB Std 11 Computer MCQ Answers Ch 7 Vim Editor and Basic Scripting

Question 214.
Should there be no space on either side of the equal to (=) symbol at the time of assigning a value to a variable.
(A) Yes
(B) No
(C) None of these
(D) All of these
Answer:
(A) Yes

Question 215.
If due to some reasons a space occurs at either side of the equal to (=) symbol, the shell will interpret the string after the space as a ………………
(A) null
(B) command
(C) string
(D) expression
Answer:
(B) command

Question 216.
If due to some reasons a space occurs at either side of the equal to (=) symbol, we would ge …………… output.
(A) correct
(B) unexpected
(C) null
(D) zero
Answer:
(B) unexpected

Question 217.
If we reuse this variable again, the old value stored in it will be …………..
(A) old value
(B) zero
(C) overwritten
(D) null
Answer:
(C) overwritten

Leave a Comment

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