+ 1
what is stack and how to we use it.
4 Antworten
+ 3
The stack is where your local variables are allocated in memory.
+ 3
A stack isn't a physical object you can create. We can't really provide an example for it.
int main()
{
int x = 5;
}
Here we are allocating memory from the stack to int x. If we were working with dynamic variables, that would be memory taken from the heap.
+ 2
cohen creber thanks for the reply
+ 1
but how to define a stqck please help wirh a function