??
//
?
/ E. None of the above
Answer is Right!
Answer is Wrong!
The correct answer is D. /
The forward slash (/) is used to search for a pattern in the forward direction in vi editor. For example, if you want to search for the word “hello” in the current file, you would type /hello
and then press Enter. The cursor will move to the first occurrence of the word “hello” in the file. You can then use the n
and N
keys to move to the next and previous occurrences of the word, respectively.
The other options are incorrect.
- Option A,
??
, is used to search for the previous occurrence of the previous search pattern. - Option B,
//
, is used to search for the next occurrence of the previous search pattern. - Option C,
?
, is used to search for the next occurrence of the character that follows it. - Option E, None of the above, is incorrect because it is not a valid vi editor command.