Questions tagged as 'stack'

2
answers

How does Stack work in C #?

I came to a part of my program where I have to apply a stack and wanted someone to give me a simple explanation and an example. The program that I am doing at the moment is a notepad where you create several "roles" to post something importan...
asked by 11.03.2014 / 23:06
1
answer

When does Stack Overflow occur?

A question that has everything to do with the name of this site. We know that one of the most commonly used examples for demonstrating the execution stack of a program is recursion. A recursive function must have: stop condition and recursio...
asked by 01.11.2015 / 18:13
2
answers

What makes an object eligible to be allocated on the stack?

Link to the article: link   "The programming language (Java) does not offer the possibility to let the programmer decide if an object should be generated in the stack.   But in certain cases it would be desirable to allocate an object on   ...
asked by 04.04.2016 / 23:27
2
answers

How does the jQuery stack work?

When I learned how to use the .end method of jQuery, I realized that it was a powerful tool that ensures a lot of expressiveness to the code (and I was soon seeing how to integrate it with my plugins ). Although I have a basic understa...
asked by 05.02.2014 / 01:30
2
answers

Why are you giving segmentation fault in my Assembly inline?

I'm trying to call the execve("bin/sh"...) function using assembly, however in the statement: mov %rsi,0x8(%rsi) I get a segmentation error. This is the 64bit version of the article code "smash the stack for fun and profit". voi...
asked by 08.04.2014 / 04:19
2
answers

Why ArrayList instead of Stack in the implementation of Memento pattern?

As you all know, the Memento pattern is the default that saves different states of objects and then retrieves them. The intent is not to retrieve the "last" entry and then remove it? This is a stack, right? So why do examples use ArrayL...
asked by 31.12.2014 / 12:50
2
answers

What is the behavior of static variables in .Net?

What is the behavior of static variables in .Net? Are these stored in the Heap or the Stack?     
asked by 04.08.2014 / 20:20
2
answers

How to implement a queue using two stacks

Hello, I need to implement a queue using two stacks, that is, I need to insert an integer in stack 1, and when I remove an element all the items in stack 1 must be transferred to stack 2, then make it look like with a queue. Items in stack 1 c...
asked by 08.09.2018 / 23:01
1
answer

Cryptography using piles in java

In an encrypted message using Stack to invert each word of a String and using chatAt (int) to get characters specific to it, I had the following problem, when if you put a character on the stack, you can not use primitive types as a paramete...
asked by 13.11.2015 / 00:04
1
answer

Are variables allocated randomly in memory?

In a book about C, in which I started studying variables, I would say that the variables were randomly placed in memory, for example: int a; int b; printf("a = %d\n", &a); --> 5000 (endereço) (%d ao invés de %p para simplificar) printf...
asked by 02.11.2017 / 22:16