Most voted "stack" questions
A stack is an optimized way to organize data in memory allocated in sequence and abandoned in reverse sequence to the input.
Learn more…116 questions
Sort by count of
-
0
votes0
answers923
viewsError: "The expression must be a modifiable lvalue"
Hello! I’m learning C, and I’m trying to make a simple program, which consists of a "Stack of Books" in which I need to Store the Book Title, Author and Book Code, using structs and Stacks of Data.…
-
0
votes0
answers97
viewsHow to access the i-th position of an array?
I have the following statement Define a stored stack in an array; a. Insert a widget at the top of the stack (push); b. Removing an item from the top of the stack (pop); c. Return the number of…
-
0
votes0
answers36
viewsHelp with arithmetic expression using stack
Hello, good morning, everyone! I have a problem solving this exercise, and I don’t really know where to go. My program must have an input that is a mathematical expression and must have as output S…
-
0
votes2
answers91
viewsfree() does not work in Dynamic Stack code
The dynamic stack works normally, but when I try to use the free() method to de-locate the memory of the removed elements and reboot the structure, the compiler does not return as expected.…
-
0
votes1
answer71
views -
0
votes0
answers20
viewsError setting stack by kernel
I always thought I understood about the stack but I realized that no, I’m wanting to understand the stack in practice, so I created this environment The idea is to set the top of the stack at 7FFFh…
-
-1
votes2
answers68
viewsVector by Parameter in C
I need to pass the Vector position by parameter as follows code, my function receives the address and modifies directly the variable passed by parameter. But the program stops working and closes…
-
-1
votes1
answer702
viewsCheck that stack 1 elements are equal to stack 2, C++
You guys, good night! I need to do this part of the code in C++ comparing whether the elements on Stack 1 are the same as on Stack 2 and whether the amount of elements are exactly the same. I don’t…
-
-1
votes0
answers17
viewsDoubt about stack
On a stack, the first element is set to top and the last element inserted as the base of the stack. That statement is incorrect right?
-
-1
votes1
answer532
viewsHow do I return the number of items in a stack
******I did this Exercise , however in the count of stack elements, is not appearing the value of items Could help me please **** #include <stdio.h> #include <stdlib.h> /* Um elemento da…
-
-1
votes1
answer63
viewsWhy can I still access a variable in the heap even after the function is over?
A while ago I learned about heap and stack, I was testing some codes when I came across a strange behavior in heap see; #include <iostream> using namespace std; void Test1(int *i[]); void…
-
-1
votes2
answers169
viewsFunction clone stack value
Hello, I have an activity that asks me some functions, among them a cloning functionValorPilha(struct no **Stack) (this form is mandatory), but whenever I try to compile what is written does not…
-
-1
votes1
answer98
viewsI can’t navigate routes of different Stacks with React navigation
I have 3 files of routes. It contains the routes that the user can access without having to be logged in, in my case only the signin screen. import React from 'react'; import { createStackNavigator…
-
-2
votes1
answer36
viewsSegmentation Fault when running pop command on dynamic stack
I’m trying to implement a dynamic stack but the program ends in error when executing the pop(pop) pop function, returning a Segmentation Fault. I can’t understand why.. I appreciate the help.…
-
-3
votes1
answer470
viewsPython pile
I am unable to solve an exercise using python stack... A sequence of parentheses "(" ")", brackets "[" "]" and keys "{" "}" is said to be balanced if each "open" symbol is "closed" at an appropriate…
-
-3
votes3
answers71
viewsYou are not printing string
Good morning, someone can help me? It is intended to develop the function invert_pal(st) it takes as parameter a string st and returns as a result the same string in which each word was inverted.…