How does stack look in function calls? Write a recursive function call, how will the stack look like?
Answer / Rahul Pal
In a recursive function call, each new call creates a new frame on the stack. The new frame contains the return address of the current function (which points to the next instruction after the return statement), local variables, and parameters. As the recursion deepens, more frames are pushed onto the stack. If the recursion is too deep, it can cause stack overflow.
| Is This Answer Correct ? | 0 Yes | 0 No |
What are string library functions(syntax).
How will you execute a stack using a priority queue? (Push and pop should be in O (1)).
What are "pure virtual" functions?
1 Answers Adobe, Alter, iNautix,
Discuss the role of C++ shorthands.
In C++ what is the meaning of data hiding?
Explain the difference between method overriding and method overloading in C++?
what is friend function in C++?
Write a C++ Program to Find Sum and Average of three numbers.
What are the advantages and disadvantages of B-star trees over Binary trees?
What is meant by exit controlled loop?
Define type casting in C++.
What is the difference between an ARRAY and a LIST in C++?