Question: Rewriting C code (also in C++) 4. 120 points] Consider the following Pascal program: program Progl (input, output); function test (var x, y: integer; z

Rewriting C code (also in C++)

Rewriting C code (also in C++) 4. 120 points] Consider the following

4. 120 points] Consider the following Pascal program: program Progl (input, output); function test (var x, y: integer; z : integer) integer; begin z:= x + y; x:= 2 * z; := x + 3; testz; end; var i,j,k,w integer; begin write 'Enter values readln (i, j, k) w := test (i, j, k); writeln ('output: ', i,'',j,'', k,'',w) end a. Rewrite the above code in C using pointers, printf, and scanf. b. Rewrite the above code in C++ using reference parameters, cout, and cin c. What does the program print if the input is entered with 3 4 5

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!