Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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++)
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 5Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started