Multiple choice technology

Option to save and exit from a file ?

  1. :w

  2. :q

  3. :x

  4. :q!

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The :x command in vi saves changes and exits the file in one step. Option :w only saves (write) without exiting, :q quits only if no changes were made, and :q! quits discarding changes. For a save-and-exit operation, :x or :wq are the correct choices.