Oracle Database: Advanced PL/SQL — Question 62
Which three statements are true about passing parameters to subprograms? (Choose three.)
Answer options
- A. PL/SQL assigns values to actual parameters in subprograms with unhandled exceptions.
- B. IN parameters passed to subprograms act like constants, to which values cannot be assigned by the subprogram.
- C. IN OUT parameters pass initial values to subprograms and return values updated by subprograms to the caller.
- D. The actual parameter must be a variable when calling a subprogram with an OUT parameter.
- E. IN parameters passed to subprograms act like variables, to which values can be assigned by the subprogram.
- F. OUT parameters returning values to calling subprograms act like constants in the called subprogram.
- G. Actual parameters corresponding to IN OUT formal parameters can be constants or expressions.
Correct answer: B, C, D
Explanation
Option B is correct because IN parameters indeed act like constants and cannot be modified by the subprogram. Option C is accurate as IN OUT parameters both send initial values and receive updated values. Option D is correct since an actual parameter must be a variable when using an OUT parameter, which allows the subprogram to change its value. The other options incorrectly describe the behavior of IN and OUT parameters.