Question: Suppose the subprogram header is changed to the following: Subprogram Sub(Integer Num1,Integer Num2) If code corresponding to the new pseudocode is run, what is the

Suppose the subprogram header is changed to the following:

Subprogram Sub(Integer Num1,Integer Num2)

If code corresponding to the new pseudocode is run, what is the output now?

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

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 Write X End Subprogram

Step by Step Solution

3.45 Rating (155 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Prelude to Programming Questions!