What is the scope of the following variables? a. X, declared in the main program? b. X,

Question:

What is the scope of the following variables?

a. X, declared in the main program?

b. X, declared in the subprogram?

Main Declare X As Integer, Y As Integer Set X = 1 Set Y = 2 Call Sub(X, Y) Write X Write Y End Program Subprogram Sub(Integer Numl, Integer Num2 As Ref) Declare X As Integer Set Numl = 3 %3! Set Num2 = 4 %3! Set X = 5

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Prelude To Programming

ISBN: 9780133741636

6th Edition

Authors: Stewart Venit, Elizabeth Drake

Question Posted: