Question: 12. The following is a program segment and the definition of a function named sub. (3 pts) Main program: X = 12; 2 = 8;

 12. The following is a program segment and the definition of

12. The following is a program segment and the definition of a function named sub. (3 pts) Main program: X = 12; 2 = 8; sub (X, 2); print(X, Z); Function sub (Y, W): Y = Y - 10; W = W + 2; What values will be printed by the program segment if X is passed by value and Z by reference to the function Sub? Z=

Step by Step Solution

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 Databases Questions!