7. Given the function definition void Twist (int a, int& b) int ci c a2; a -a 3;
ID: 3673302 • Letter: 7
Question
7. Given the function definition void Twist (int a, int& b) int ci c a2; a -a 3; b-c+ a What is the output of the following code fragment that invokes Twist? (All variables are of type int.) r 1 s = 2; t = 3; Twist (t, s) a. 1 143 b. 1 103 c. 5 143 d. 1 149 e. None of the above. 8. Consider the function definition void Demo(int intval, doubles doubleval) intVal -intVal2 doubleVal double(intVal) +3.5 Suppose that the caller has variables mylnt and mydouble whose values are 20 and 4.8, respectively. What are the values of myint and mydouble after return from the following function call? Demo (myInt, mydouble) a. myint 20 and mydouble 43.5 b. mylnt = 40 and mydouble 4.8 d, mylnt = 40 and mydouble = 43.5 e. None of the above.Explanation / Answer
Answer:
Problem number 7-----------------------------------------> correct answer is option (a) i.e 1 14 3
Problem number 8-----------------------------------------> correct answer is option (a) i.e myInt=20 and mydouble=43.5
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.