In vi editor, forward search is performed using the command. A. :pat B. ?pat C. /pat D. All of the above E. None of the above

:pat
?pat
/pat
All of the above E. None of the above

The correct answer is C. /pat.

The forward search command in vi editor is /pat. This command will search for the pattern pat in the current file. If the pattern is found, the cursor will be placed on the first occurrence of the pattern. If the pattern is not found, the cursor will be placed at the end of the file.

The other options are not correct. The command :pat is a colon command, which is used to execute a command. The command ?pat is a question mark command, which is used to search for the pattern pat in the current file, but it will search backwards from the current cursor position. The command All of the above is not correct because only option C is correct. The command None of the above is not correct because option C is correct.

Exit mobile version