Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 31 What are the three values Blank 1, Blank 2, and Blank 3 in order that will be displayed when the following code is
Question 31
What are the three values Blank 1, Blank 2, and Blank 3 in order that will be displayed when the following code is executed?
class Value { public: int i = 15; }; class Test { public: void first() { int i = 5; Value *v = new Value(); v->i = 25; second(*v, i); cout << " " << v->i << endl; } void second(Value v, int i) { i = 0; v.i = 20; Value val; v = val; cout << v.i << " " << i; } }; int main() { Test *t = new Test(); t->first(); }
Step 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