Which of the following sequences in the vi editor saves the opened document and exits the editor? (Choose TWO correct answers.)
A
esc ZZ
Correta
B
ctrl :w!
C
esc zz
D
esc :wq!
Correta
E
ctrl XX
Explicação Oficial / Explicações da Comunidade
In vi, ZZ in command mode is a quick shortcut to save and quit. The sequence :wq (Write and Quit) is the standard ex-mode command to perform the same action. wq! ensures the save even if the file has read-only permissions (provided the user has ownership/rights).