Question

Consider the following C++ program: #include <iostream> using namespace std; void f1(int); void f2(int); void f3(int);...

Consider the following C++ program:

#include <iostream>
using namespace std;

void f1(int);
void f2(int);
void f3(int);

int main()
{    
    f1(10);
    return 0;
}

void f1(int n)
{    
    f2(n + 5);
}

void f2(int n)
{    
    f3(n - 2);
}

void f3(int n)
{    
    cout << n << endl;    // LINE 1
}

Just before the program statement marked with the comment "LINE 1" is executed, how many stack frames will be on the program call stack?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

SOL:

Soi: from The program execution will starts Main. First the main () is called and main() is pushed to stack e Next FIC) is ca

Add a comment
Know the answer?
Add Answer to:
Consider the following C++ program: #include <iostream> using namespace std; void f1(int); void f2(int); void f3(int);...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT