Multiple choice technology programming languages

Procedure C is a local construct to the package. What happens when this package is compiled?

  1. It produces the output Procedure B calling C

  2. It produces the output Procedure C calling B

  3. It produces a compilation error because procedure C requires a forward declaration

  4. It produces a compilation error because procedure B requires a forward declaration.

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

In PL/SQL packages, procedures must be declared before they can be called by other procedures in the same package specification or body. If procedure B calls procedure C, and C is defined after B in the package body without a forward declaration, the compiler cannot resolve the reference to C when compiling B.