Multiple choice technology databases

Examine this package body:CREATE OR REPLACE PACKAGE BODY forward_packISV_sum NUMBER;- 44 -PROCEDURE calc_ord(. . . );PROCEDURE generate_summary(. . . )ISBEGINCalc_ord(. . . );. . .END calc_ord;END forward_pack;/ Which construct has a forward declaration?

  1. V_SUM

  2. CALC_ORD.

  3. FORWARD_PACK

  4. GENERATE_SUMMARY.

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

A forward declaration declares a procedure or function before its full definition is provided. In the package body, PROCEDURE calc_ord(. . . ); is a forward declaration - just the signature without the body. The full definition comes later in the package body. This is needed when one subprogram calls another that hasn't been defined yet (forward reference). V_SUM is a variable declaration, FORWARD_PACK is the package name, and GENERATE_SUMMARY is fully defined (not forward declared).