Multiple choice technology programming languages

which is correct?

  1. 1 can only be called with predecleration of complex_num

  2. 1 and 2 are same

  3. 2 can only be called with predecleration of complex_num

  4. 1 is reference to a subroutine

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

This refers to Perl subroutine predeclaration. In Perl, calling a subroutine before it's declared requires either predeclaration (forward declaration with 'sub name;') or using parentheses. Option 1 (likely '&sub or sub()) requires no predeclaration. Option 2 (likely just 'sub') requires predeclaration to avoid ambiguity with barewords. Thus option 2 specifically needs predeclaration of complex_num.