stack

  • Odd behaviour of "stack smashing detected" 2018-08-08

    This is my code. struct ar { char array[10]; }b; void func() { char array[10]; scanf("%s",b.array); printf("%s\n", b.array); scanf("%s",array); printf("%s\n", array); } int main(int argc, char **argv) { func(); } Wh

    Tags: arrays, stack, gcc
  • How would I add values since they are strings? 2018-04-20

    I have already tried using atoi then switching them back to strings to push, I am trying to make a rpn calculator for class so the push, pop, seek, and stack structure are how then need to be but I cant get it to add the integer values. #include <std

    Tags: stack, rpn
  • Performance difference between arrays, stacks and queues 2018-03-17

    What is the search performance of arrays, stacks and queues? I think that arrays are the quickest and most straightforward, because I can access any element immediately by calling it using its index. Is this correct? What about the performance of sta

    Tags: java, arrays, stack, queue
  • why preserve stack space for local variables? 2016-07-30

    I'm new to assembly language and I was wondering about local variables, why do we (or the compilers) preserve a space for them on the stack usually by decrement the "ESP" register at the prologue of the procedure and as the procedure ends we ass

    Tags: assembly, stack, compilation, compiler optimization
  • In assembly code, how .cfi directive works? 2015-10-04

    [assembly code] main: .LFB0: .cfi_startproc pushl %ebp .cfi_def_cfa_offset 8 .cfi_offset 5, -8 movl %esp, %ebp .cfi_def_cfa_register 5 andl $-16, %esp subl $32, %esp movl $5, 20(%esp) movl $3, 24(%esp) movl 24(%esp), %eax movl %eax, 4(%esp) movl 20(%

    Tags: assembly, stack, dwarf
  • Assembly Language - push instruction being skipped 2015-03-19

    I'm working on an assembly project and for some reason when I go into the debugger and look at this call statement being executed it is skipping the first push statement. using call statement: push offset strPrompt push offset strNum push offset iArr

    Tags: assembly, stack, push, masm
  • Implementing a Postfix Calculator from a file using a Stack (java) 2015-02-25

    I'm having difficulty coming up with coding the algorithm necessary to accomplish this in my infix method. I'm using a pop/push method. Below is the expected input and output of my code. Here are the exact steps needed in the algorithm: Input is a st

    Tags: java, file, stack
  • Base 10 - Base 2 Converter in Java using a Stack 2015-02-05

    I am not sure how close I am to end of this, but I have to create a program in Java using a Stack. I have the Stack class done, and now the only thing giving me issues is the Converter class. I am getting the following when I compile: Base10Converter

    Tags: java, stack, binary, base
  • Displaying multiple variables on single line? 2015-02-04

    So I'm doing a program which reads in a message up to 80 characters long and displays it back to the user using the push, pop, and isempty methods. The only problem is, a single variable will be printed on the line, so the backwards message goes vert

    Tags: java, stack, push, is empty
  • What are the advantages and disadvantages of using std::stack instead of just deque, vector or list 2015-01-29

    I am writing a very simple std::stack using vector as its underlying container. I realized that I could replace all the push(), pop() and top() functions with push_back(), pop_back() and back() of the vector container. My questions are: why to use a

    Tags: stack, stl, containers
  • C stack odd behavior 2015-01-03

    I am using the Hope functional program on Ubuntu 14.04 with gcc 4.8.2, and doing a highly recursive function to find a large number of prime numbers. However, I get a segmentation fault: 0x000000000040e03f in reach cell=<error reading variable: Ca

    Tags: stack, segmentation fault
  • Control real time display with richtextbox 2014-12-29

    I'm working with C# and control CMD for coworker. I already implement control cmd and real time display to rich text box. But real request was stack this message to rich text box. My program couldn't stack the cmd command (keep history of previous cm

    Tags: cmd, stack, real time, dynamic data display
  • Heap vs Stack in regard to read/write speed 2014-12-04

    I just went through a bunch of stack vs heap threads here on Stack Overflow (and other random sites found through Google), and yet I can't find an answer that provides much (if any) depth to the issue of read/write speed (most answers and articles fo

    Tags: performance, stack, heap
  • Stack columns row by row 2014-12-04

    I have a dataframe which contains 2 columns, such as Name Seq 1 ENSE00000789668:ENSE00000789668 CTCAAAATTTGCTGCAGCAGAAATTACTGAGGCGATCCATTTTCTCAGCCTATTAAATTTC 2 ENSE00000789668:ENSE00000814448 CTCAAAATTTGCTGCAGCAGAAATTACTGAGTTTCAGCGGATGTTCTCTCCAGCTTTC

    Tags: stack
  • C++ Array Implementation of Stack 2014-11-24

    This is the implementation I have so far for the array implementation of a stack. However I'm getting a breakpoint error in the function isFullStack() and i've been pretty confused. Explanation would be helpful, thanks! //Header file: myStack.h #ifnd

    Tags: arrays, stack
  • Create stack space within a struct in C 2014-11-09

    I have: typedef struct{ int *stack; int *stack_ptr; }MyStruct; then somewhere else I do: MyStruct *temp = malloc(sizeof(MyStruct)); temp->stack = malloc(1024) //allocate 1024 bytes temp->stack_ptr = temp->stack; //stack_ptr points to beginni

    Tags: stack, struct
  • Converting infix-expression to postfix-expression causing weird symbols to show up

    Converting infix-expression to postfix-expression causing weird symbols to show up 2014-11-02

    I am trying to parse a fully parenthesized infix-expression and convert it to a postfix-expression so I can easily implement the expression into a binary arithmetic tree. Here is an example string that I am using: ((x2+5.14)*(3.41-5.00)) Here is the

    Tags: stack, binary tree
  • Why keep a kernel stack for each process in linux? 2014-06-25

    What's the point in keeping a different kernel stack for each process in linux? Why not keep just one stack for the kernel to work with? --------------Solutions------------- What's the point in keeping a different kernel stack for each process in lin

    Tags: linux, process, stack, linux kernel
  • create a stack in java 2014-06-25

    I need to use stack to create a list storing objects, and I try to look up in API, however, I have no idea which is the syntax I should refer to. Here is my code: public class Rock { public String name; public Rock(String name){ this.name=name; } } p

    Tags: java, stack, vector
  • Keeping track of what needs to be removed in a linked list 2014-06-11

    I'm using a while loop to loop through a linked list of nodes, with each node having a value that is a stack. If the top value of the stack is the same for 3 nodes in a row, then the top value needs to be removed, and points need to be scored. How wo

    Tags: python, linked list, stack

Copyright (C) dskims.com, All Rights Reserved.

processed in 4.076 (s). 9 q(s)