Question: Based on the following code and knowing that recursive calls are allowed, but NOT forward references -List potential procedures that could be called by the
Based on the following code and knowing that recursive calls are allowed, but NOT forward references
-List potential procedures that could be called by the following procedures
fill in below chart for Main, Sub1, Sub2 and Sub3 based on the program at the bottom:
Again rembember that recursive calls are allowed but NOT forward references.
==========================================
main can call:_______________________________
sub1 can call:_______________________________
sub2 can call:_______________________________
sub3 can call:_______________________________
==========================================
proc main; var w, x, y, z;
proc sub1; var x, z; X := 6; Z := 7; x :=x + y * z; end sub1;
proc sub2; var w, x, y; w := 11; subl; end sub2;
proc sub3; var w; w := 1 O; x := w+x; y := x + z + 2; end sub3;
begin w := O; x := 1; y := 3; z := 5; sub2; sub3;
end main.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
