InterviewSolution
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
For compiling a C program without leaving the editor, which command will be used?(a) cc %(b) :! Cc(c) :!cc %(d) :!cThe question was posed to me during an online interview.Enquiry is from Customizing Vi Editor topic in chapter Advanced Vi of Unix |
|
Answer» The correct answer is (C) :!cc % |
|
| 2. |
Which of the following statement is not true?(a) f and t commands are used for searching a character(b) y and yy are same(c) vi has 26 named buffers(d) :e# is used for toggling between filesThe question was asked by my school teacher while I was bunking the class.This intriguing question originated from Customizing Vi Editor in division Advanced Vi of Unix |
|
Answer» CORRECT ANSWER is (b) y and yy are same Best explanation: The y operator YANKS text but it cannot perform any function UNLESS it is combined with any command or itself. |
|
| 3. |
/* and f* are same.(a) True(b) FalseI have been asked this question in an interview for internship.This is a very interesting question from Customizing Vi Editor in portion Advanced Vi of Unix |
|
Answer» The correct CHOICE is (b) False |
|
| 4. |
To change the default tab stop spaces in vi, ___ can be used with :set.(a) nomagic(b) tabstop=n(c) tab(d) tabchangeThe question was asked in an interview for job.My question comes from Customizing Vi Editor topic in portion Advanced Vi of Unix |
|
Answer» The correct choice is (b) tabstop=n |
|
| 5. |
Which command is used for mapping keys of a keyboard?(a) set(b) map(c) abbr(d) autowriteThe question was posed to me in an interview.I want to ask this question from Customizing Vi Editor topic in portion Advanced Vi of Unix |
|
Answer» Right option is (B) map |
|
| 6. |
Which of the following is used with :set to customize vi to ignore case in pattern searches?(a) nomatch(b) ignorecase(c) nocase(d) nomagicThis question was posed to me during an interview.I need to ask this question from Customizing Vi Editor topic in division Advanced Vi of Unix |
|
Answer» Correct answer is (B) ignorecase |
|
| 7. |
For automatic indentation, ____ is used with : set command.(a) autowrite(b) autoindent(c) automode(d) showmodeThis question was posed to me in an internship interview.The doubt is from Customizing Vi Editor in portion Advanced Vi of Unix |
|
Answer» The correct OPTION is (b) autoindent |
|
| 8. |
vi environment is determined by variable settings. These variables are controlled by ____ command.(a) :set(b) :abbr(c) :map(d) autowriteThis question was posed to me by my school principal while I was bunking the class.My question is taken from Customizing Vi Editor topic in portion Advanced Vi of Unix |
|
Answer» Correct answer is (a) :SET |
|
| 9. |
For customizing vi, which of the following command is used?(a) set(b) map(c) abbr(d) set, map, abbrThe question was posed to me at a job interview.I need to ask this question from Customizing Vi Editor in division Advanced Vi of Unix |
|
Answer» The correct option is (d) set, map, abbr |
|
| 10. |
For repeating the character search , and ; are used.(a) True(b) FalseI got this question in examination.The above asked question is from Customizing Vi Editor topic in division Advanced Vi of Unix |
|
Answer» The correct answer is (a) True |
|
| 11. |
__ and __ commands works in a reverse manner as f and t.(a) F, T(b) tf, ft(c) z, x(d) ff, ttThis question was addressed to me in class test.The origin of the question is Customizing Vi Editor in chapter Advanced Vi of Unix |
|
Answer» The CORRECT choice is (a) F, T |
|
| 12. |
For moving the cursor forward to the first occurrence of a character, __ is used.(a) d(b) t(c) f(d) nI got this question by my school teacher while I was bunking the class.The query is from Customizing Vi Editor in section Advanced Vi of Unix |
|
Answer» Right option is (c) F |
|
| 13. |
t command positions the cursor a single character before the occurrence.(a) True(b) FalseThis question was posed to me during a job interview.Question is from Customizing Vi Editor topic in portion Advanced Vi of Unix |
|
Answer» Correct option is (a) True |
|
| 14. |
For searching a character, ___ and ___ are used.(a) f, t(b) n, w(c) e, d(d) k, nI got this question in a national level competition.My doubt stems from Customizing Vi Editor topic in section Advanced Vi of Unix |
|
Answer» Correct choice is (a) f, t |
|
| 15. |
Which of the following is an invalid command?(a) :r file01(b) :e file01(c) :e#(d) :w # file01The question was asked in an interview for internship.I'd like to ask this question from Handling Multiple Files and Buffers in chapter Advanced Vi of Unix |
|
Answer» Correct choice is (d) :w # file01 |
|
| 16. |
To append contents of buffer to file01, we can use __________(a) : w >> file01(b) :r > file01(c) :w > file01(d) :r >> file01This question was addressed to me by my school principal while I was bunking the class.My doubt is from Handling Multiple Files and Buffers topic in chapter Advanced Vi of Unix |
|
Answer» Correct ANSWER is (a) : w >> file01 |
|
| 17. |
vi used ___ to enter control characters.(a) ctrl-w(b) ctrl-v(c) ctrl-d(d) escThis question was posed to me in quiz.I'd like to ask this question from Handling Multiple Files and Buffers topic in division Advanced Vi of Unix |
|
Answer» The CORRECT answer is (b) ctrl-v |
|
| 18. |
For restoring the contents of numbered buffers efficiently, ___ command is used.(a) .(b) $(c) :nb(d) :qThe question was posed to me in homework.My query is from Handling Multiple Files and Buffers in chapter Advanced Vi of Unix |
|
Answer» RIGHT choice is (a) . The explanation: vi offers the DOT COMMAND to RESTORE the CONTENTS of any buffer efficiently. Every time this command is pressed, it steps through the buffer set to restore the contents of the next buffer. |
|
| 19. |
The technique of restoring line deletions from numbered buffers is applicable only to entire lines.(a) True(b) FalseThe question was asked in an international level competition.The above asked question is from Handling Multiple Files and Buffers in chapter Advanced Vi of Unix |
|
Answer» The correct choice is (a) True |
|
| 20. |
To restore a number of recent deletions, numbered buffers are used.(a) True(b) FalseI got this question in an interview for internship.This interesting question is from Handling Multiple Files and Buffers topic in portion Advanced Vi of Unix |
|
Answer» The correct OPTION is (a) True |
|
| 21. |
vi editor has ____ named buffers.(a) 2(b) 4(c) 26(d) 5This question was addressed to me by my college director while I was bunking the class.I need to ask this question from Handling Multiple Files and Buffers topic in section Advanced Vi of Unix |
|
Answer» Correct choice is (c) 26 |
|
| 22. |
To remove all other windows except the current one, which of the following command is used?(a) :on(b) :new(c) :n(d) :rThe question was asked in class test.This is a very interesting question from Handling Multiple Files and Buffers in section Advanced Vi of Unix |
|
Answer» The correct answer is (a) :on |
|
| 23. |
To create a new window, ____ can be used.(a) :sp(b) :new(c) :n(d) :rThe question was asked in an online quiz.Enquiry is from Handling Multiple Files and Buffers in portion Advanced Vi of Unix |
|
Answer» Right choice is (c) :n |
|
| 24. |
To split the screen into multiple windows, we can use ____ command.(a) :sp(b) :new(c) :n(d) :rThis question was posed to me in examination.Question is taken from Handling Multiple Files and Buffers topic in section Advanced Vi of Unix |
|
Answer» Correct option is (a) :sp |
|
| 25. |
We can move back to the previous file using ____ command.(a) new(b) :n(c) :rew(d) :prevThis question was addressed to me in class test.The question is from Handling Multiple Files and Buffers topic in chapter Advanced Vi of Unix |
|
Answer» The correct answer is (c) :rew |
|
| 26. |
:r!date inserts the output of date command in our file.(a) True(b) FalseThe question was asked during an online exam.This interesting question is from Handling Multiple Files and Buffers topic in portion Advanced Vi of Unix |
|
Answer» Correct option is (a) True |
|
| 27. |
When multiple filenames are used with vi, we can switch to next file using ___ command.(a) new(b) :n(c) :rew(d) :prevThis question was addressed to me during an interview.This intriguing question originated from Handling Multiple Files and Buffers topic in section Advanced Vi of Unix |
|
Answer» Right option is (c) :rew |
|
| 28. |
For returning back to the original file after switching we can use:(a) :e!(b) ctrl-^(c) :e#(d) ctrl-^ and :e#This question was addressed to me during an interview.Asked question is from Handling Multiple Files and Buffers in division Advanced Vi of Unix |
|
Answer» The correct CHOICE is (d) ctrl-^ and :e# |
|
| 29. |
Which of the following command is used for switching files?(a) :e(b) e!(c) !e(d) !rI got this question in an international level competition.This interesting question is from Handling Multiple Files and Buffers in section Advanced Vi of Unix |
|
Answer» Right answer is (a) :e |
|
| 30. |
Which of the following is not a valid operator-command combination?(a) 5dd(b) yy5(c) cc(d) yGThe question was posed to me in examination.This is a very interesting question from Operator-Command Combinations topic in chapter Advanced Vi of Unix |
|
Answer» RIGHT ANSWER is (b) yy5 Best EXPLANATION: The command yy5 is not a VALID ONE as we cannot prefix the command yy with an integer value. |
|
| 31. |
To sort all lines from current cursor to end of line, ____ can be used.(a) sort .,$(b) sort !G(c) sort !,G(d) !GsortI had been asked this question in an interview for internship.My question is based upon Operator-Command Combinations in division Advanced Vi of Unix |
|
Answer» RIGHT CHOICE is (d) !Gsort The explanation: The sort command is combined with ! and G OPERATOR for sorting from current CURSOR to the END of the line. |
|
| 32. |
The command c0 will change the text from current cursor to the end of line.(a) True(b) FalseThis question was posed to me at a job interview.I want to ask this question from Operator-Command Combinations in chapter Advanced Vi of Unix |
|
Answer» The correct choice is (B) False |
|
| 33. |
To yank from current cursor up to first occurrence of string strin reverse direction, we can use:(a) y?str(b) y!str(c) yy str(d) yy ! strThe question was posed to me in an online interview.My doubt is from Operator-Command Combinations topic in section Advanced Vi of Unix |
|
Answer» Correct option is (a) y?str |
|
| 34. |
The command df. will _____(a) deletes entire line(b) deletes entire paragraph(c) deletes from current cursor up to first occurrence of(d) deletes zero linesThis question was posed to me by my school principal while I was bunking the class.This intriguing question comes from Operator-Command Combinations topic in portion Advanced Vi of Unix |
|
Answer» The correct OPTION is (C) deletes from CURRENT CURSOR up to first occurrence of |
|
| 35. |
To delete from current cursor upto the first occurrence of }, which of the following will be used?(a) dd$}(b) d /(c) d / }(d) }The question was asked during an online interview.This key question is from Operator-Command Combinations in portion Advanced Vi of Unix |
|
Answer» CORRECT choice is (c) d / } To EXPLAIN: We can PERFORM MANY functions using operator-command combinations. For example, d / } will deletes from the current cursor upto first occurrence of } . |
|
| 36. |
To change entire lines, ____ is used.(a) cc(b) CC(c) dd(d) c$I got this question during an interview.My enquiry is from Operator-Command Combinations topic in section Advanced Vi of Unix |
|
Answer» Right answer is (a) cc |
|
| 37. |
Which operator is used in vi to filter text?(a) %%(b) &&(c) $(d) !I have been asked this question during an online interview.Question is taken from Operator-Command Combinations in section Advanced Vi of Unix |
|
Answer» Right ANSWER is (d) ! |
|
| 38. |
c operator is used for changing the text.(a) True(b) FalseI have been asked this question in final exam.This is a very interesting question from Operator-Command Combinations in chapter Advanced Vi of Unix |
|
Answer» Correct answer is (a) True |
|
| 39. |
For pasting text, ____ is used.(a) p or P(b) d or D(c) C(d) x or XI had been asked this question in an online interview.My question is based upon Operator-Command Combinations in section Advanced Vi of Unix |
|
Answer» The CORRECT choice is (a) p or P |
|
| 40. |
For yanking text, ___ is used.(a) d(b) y(c) c(d) GThe question was posed to me during an online exam.This is a very interesting question from Operator-Command Combinations topic in chapter Advanced Vi of Unix |
|
Answer» Correct OPTION is (b) y |
|
| 41. |
An operator can’t perform any function without being combined with a command or itself.(a) True(b) FalseThis question was addressed to me in an international level competition.The doubt is from Operator-Command Combinations in chapter Advanced Vi of Unix |
|
Answer» Correct CHOICE is (a) True |
|
| 42. |
dw will ________(a) deletes one line(b) deletes one word(c) deletes one character(d) deletes one sentenceI got this question in quiz.This intriguing question originated from Operator-Command Combinations topic in chapter Advanced Vi of Unix |
|
Answer» Correct choice is (b) DELETES one word |
|
| 43. |
For deleting the line form current cursor to the end of the line, we can use:(a) $(b) d$(c) dd(d) $dThis question was posed to me in a national level competition.This question is from Operator-Command Combinations topic in portion Advanced Vi of Unix |
|
Answer» Right option is (a) $ |
|