Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.

Unit 9 MCQs vi editor

CSE105 — Creative Engineering Workshop 60 questions. Pick an option to check it.

Read the notes Subjective questions

0 of 60 answered 0 right 0 wrong , 60 left

  1. Question 1 of 60 starting vi Easy

    Which command is used to start the vi editor and open a file named notes.txt?

  2. Question 2 of 60 starting vi Easy

    When vi first opens a file, which mode is it in by default?

  3. Question 3 of 60 starting vi Easy

    Which key is pressed to switch from Command mode to Insert mode in vi?

  4. Question 4 of 60 Navigation Commands Easy

    In vi Command mode, which key moves the cursor one character to the right?

  5. Question 5 of 60 Navigation Commands Easy

    Which key moves the cursor down one line in vi Command mode?

  6. Question 6 of 60 Navigation Commands Easy

    Which command moves the cursor to the beginning of the current line?

  7. Question 7 of 60 Navigation Commands Easy

    Which command moves the cursor to the end of the current line in vi?

  8. Question 8 of 60 Navigation Commands Easy

    Which command moves the cursor to the last line of the file?

  9. Question 9 of 60 Scrolling Commands Easy

    Which command scrolls the screen forward by one full page in vi?

  10. Question 10 of 60 Scrolling Commands Easy

    Which command scrolls the screen backward by one full page?

  11. Question 11 of 60 Scrolling Commands Easy

    Which command scrolls the screen down by half a page?

  12. Question 12 of 60 Insert and Edit Commands Easy

    Which command appends text after the current cursor position?

  13. Question 13 of 60 Insert and Edit Commands Easy

    Which command opens a new line below the current line and enters Insert mode?

  14. Question 14 of 60 Insert and Edit Commands Easy

    Which command replaces a single character under the cursor with a new one?

  15. Question 15 of 60 Insert and Edit Commands Easy

    Which key is used to return from Insert mode back to Command mode?

  16. Question 16 of 60 Delete Commands Easy

    Which command deletes the single character under the cursor?

  17. Question 17 of 60 Delete Commands Easy

    Which command deletes the entire current line in vi?

  18. Question 18 of 60 Delete Commands Easy

    Which command deletes from the cursor to the end of the current word?

  19. Question 19 of 60 Copy-Paste Operations Easy

    Which command copies (yanks) the current line in vi?

  20. Question 20 of 60 Copy-Paste Operations Easy

    Which command pastes copied text after the cursor or below the current line?

  21. Question 21 of 60 starting vi Medium

    You want to open the file report.txt in vi and place the cursor directly on line 25 as soon as the file opens. Which command achieves this?

  22. Question 22 of 60 starting vi Medium

    A developer runs vi +/main program.c. What is the effect of this command?

  23. Question 23 of 60 starting vi Medium

    You accidentally opened an important system file and want to ensure you cannot modify it while viewing. Which command opens the file in read-only mode?

  24. Question 24 of 60 Navigation Commands Medium

    The cursor is in the middle of a line. Pressing $ followed by 0 produces what result?

  25. Question 25 of 60 Navigation Commands Medium

    In a 100-line file, which command moves the cursor directly to the last line of the file?

  26. Question 26 of 60 Navigation Commands Medium

    The cursor is at the start of the sentence The quick brown fox. You press w three times. On which word does the cursor land?

  27. Question 27 of 60 Navigation Commands Medium

    Which command moves the cursor to the matching parenthesis, brace, or bracket of the one under the cursor?

  28. Question 28 of 60 Scrolling Commands Medium

    While editing a large file in command mode, you press Ctrl+f. What happens?

  29. Question 29 of 60 Scrolling Commands Medium

    You want to scroll the display down by half a screen while keeping the cursor context. Which key combination should you use?

  30. Question 30 of 60 Scrolling Commands Medium

    What is the difference between Ctrl+u and Ctrl+b in vi?

  31. Question 31 of 60 Insert and Edit Commands Medium

    The cursor is on a character in the middle of a line. You press A. Where does insertion begin?

  32. Question 32 of 60 Insert and Edit Commands Medium

    You want to open a new empty line above the current line and start typing on it. Which command should you use?

  33. Question 33 of 60 Insert and Edit Commands Medium

    The cursor is on the letter t in the word cat. You press r and then p. What is the resulting word?

  34. Question 34 of 60 Insert and Edit Commands Medium

    Which command changes text from the cursor position to the end of the current line, entering insert mode?

  35. Question 35 of 60 Delete Commands Medium

    The cursor is at the beginning of a line. You type 3dd. What is the result?

  36. Question 36 of 60 Delete Commands Medium

    The cursor is on the first letter of the word hello. Which command deletes the word including the space after it?

  37. Question 37 of 60 Delete Commands Medium

    What does the command d$ do?

  38. Question 38 of 60 Copy-Paste Operations Medium

    You type 4yy and then move the cursor and press p. What was copied and pasted?

  39. Question 39 of 60 Copy-Paste Operations Medium

    After yanking a single line with yy, you press P (uppercase). Where is the line pasted?

  40. Question 40 of 60 Save and Exit Operations Medium

    You have made changes but decide to discard them and quit vi without saving. Which command should you use?

  41. Question 41 of 60 starting vi Hard

    A user runs vi +/main prog.c. What is the intended effect when the file opens?

  42. Question 42 of 60 starting vi Hard

    You execute vi -R notes.txt. Later you make edits and try :wq. What happens?

  43. Question 43 of 60 starting vi Hard

    What is the difference between launching vi file1 file2 versus vi -o file1 file2 in vim-compatible editors?

  44. Question 44 of 60 Navigation Commands Hard

    The cursor is at the start of a line reading foo_bar baz-qux. In command mode you press w twice. Where does the cursor land?

  45. Question 45 of 60 Navigation Commands Hard

    You are on line 50 of a 200-line file. You type 35G. What is the result?

  46. Question 46 of 60 Navigation Commands Hard

    In command mode, what is the key difference between 0, ^, and $?

  47. Question 47 of 60 Navigation Commands Hard

    Which command places the cursor on the matching bracket of the one currently under it?

  48. Question 48 of 60 Scrolling Commands Hard

    What is the precise difference between Ctrl-f and Ctrl-d while scrolling in vi?

  49. Question 49 of 60 Scrolling Commands Hard

    The cursor is somewhere in the middle of the screen. You press zz. What happens?

  50. Question 50 of 60 Scrolling Commands Hard

    Which pair correctly maps the scroll commands Ctrl-e and Ctrl-y?

  51. Question 51 of 60 Insert and Edit Commands Hard

    The cursor is on the last non-blank character of an indented line. You want to start typing after that character but at the true end of the line's content. Which single command is correct and efficient?

  52. Question 52 of 60 Insert and Edit Commands Hard

    In command mode you press 3o and type test, then press Esc. What is the result?

  53. Question 53 of 60 Insert and Edit Commands Hard

    What is the difference between r and R in command mode?

  54. Question 54 of 60 Insert and Edit Commands Hard

    The cursor is in the middle of the word configuration. You press cw and type set. What is the outcome?

  55. Question 55 of 60 Delete Commands Hard

    The cursor is at the beginning of a five-line paragraph. You type d3j. How many lines are deleted?

  56. Question 56 of 60 Delete Commands Hard

    What does d$ accomplish, and how does it differ from D?

  57. Question 57 of 60 Delete Commands Hard

    You press x five times rapidly. What is the equivalent single command?

  58. Question 58 of 60 Copy-Paste Operations Hard

    You execute 3yy then move the cursor and press p. What is placed and where?

  59. Question 59 of 60 Copy-Paste Operations Hard

    After deleting a word with dw, you press p. Why does text appear even though you did a delete, not a yank?

  60. Question 60 of 60 Copy-Paste Operations Hard

    You yank a line into named register a using "ayy, then perform several deletes. To paste the originally yanked line, which command works?

That's unit 9

Answer a few questions and your score shows up here.