Multiple choice technology programming languages

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

  1. a) V_SUM

  2. b) CALC_ORD.

  3. c) FORWARD_PACK

  4. d) GENERATE_SUMMARY.

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

A forward declaration is when a subprogram is declared before its actual implementation - PROCEDURE calc_ord(. . . ); is declared at the top, then defined later in generate_summary. This allows calling subprograms before they're defined. Option B is correct. V_sum is a variable (A), forward_pack is the package name (C), and generate_summary is the procedure containing the forward call (D).