Multiple choice technology programming languages

Which of the following is true about the file which is referenced in a DELETE statement

  1. It must be opened in INPUT mode

  2. It must be opened in OUTPUT mode

  3. It must be opened in I-O mode

  4. As in the case of SORT statement, the file must be closed before the use of this statement

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

A file referenced in a DELETE statement must be opened in I-O (input-output) mode because deletion requires both reading (to locate the record) and writing (to remove it). INPUT mode only allows reading, and OUTPUT mode only allows writing.