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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f122bf62906_10266f122bed2fb4.jpg)
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
Get step-by-step solutions from verified subject matter experts
