answersLogoWhite

0


Best Answer

The stack is a region of memory organized as a first-in-last-out (LIFO) structure which stores return information, parameters, and local variables. Since it is a LIFO structure, it is nested, i.e. "stacked", similar to how a stack of papers on your desk would be stacked, and if you could only deal with the top-most paper on the stack.

At the language level, C, C++, JAVA, etc., you generally do not even think about the implementation of the stack - it is just there - and it does what it needs in terms of return state, registers, parameters, and automatic or temporary variables.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: In c plus plus what is meant by stack?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How you use stack in c plus plus classes?

It would be easier to manipulate the stack in assembly language rather than C++.


What is meant by println in c plus plus?

println is not a C++ keyword.


Represent a stack in c plus plus?

Use a vector with a base class type. Any objects derived from the base class can be pushed and popped from the vector just as you would from a stack.


Representation of stack data structure in c plus plus?

Stack is an abstract data type that allows you to input and output data in a way that the first data which was placed in the stack will be the last one to get out. We use physical examples of stack in our daily lives such as the stack of dishes or stack of coins where you only add or remove objects from the top of the stack. You can see the implementation in c++ in related links, below.


What is pop in C plus plus?

"Pop" allows you to remove items off of the stack. The stack is an area in memory that contains the information of a program, such as function names and instructions, the values of variables, etc. The opposite of pop is "push". This allows you to add items to the stack.


How do you determine when a stack is empty in c plus plus?

#include<iostream> #include<stack> #include<cassert> int main () { std::stack<unsigned> s; assert (s.empty()==true); s.push (42); assert (s.empty()==false); s.pop (); assert (s.empty()==true); }


'write a simple program for stack operation in c plus plus?

void push(int y) { if(top>stackSize) { cout<<"stack full"<<endl; return; } else { top++; stack[top]=y; } } int pop() { int a; if(top<=0) { cout<<"stack is empty"<<endl; return 0; } else { a=stack[top]; top--; } return(a); }


What is default name of c plus plus?

If you mean the original name of C++, it was originally called "C with Classes". However, after the introduction of template metaprogramming, it was renamed C++ which meant "the successor to C".


Does PlayStation plus stack?

Yes, it is possible to purchase, or 'stack', additional time to your Plus membership


How do you refresh stack using library functions in C programming?

What do you mean by stack-refreshing? Anyway, there are no stack handling functions in the standard C library.


What is mapping exception in c plus plus?

There is no such exception in C++. It's probably a 3rd party or user-defined exception. Examine the call-stack to determine where the exception was caught -- that should help you determine where the exception was thrown.


When do we use int in c plus plus programming?

'int' is one of the built-in data-types, it is meant to hold integer values.