stack

Stack operations

I am trying to do operations using stack but when it comes to allocating the results in the previous position in the stack is ... ,dec(&p)); Div(&p); printf("\ndivisao: %.1f\n",Div(&p)); printf("\nPOP F%.1f\n",pop(&p)); }

Why ArrayList rather than Stack in the Memento standard implementation?

As you all know, the Memento pattern is the pattern that saves different states of objects and then retrieves it. Is not the ... TextoMemento estadoSalvo = estados.ElementAt(estados.Count -1); estados.RemoveAt(estados.Count - 1); Why not Stack?

Stack smashing error detected in C

Could anyone help me with the following Question: Draw up a program that fills a 6x4 array with integers, calculates and sh ... for (j = 0; j < 2; j++) { printf("\tM2: %d \n", mat2[i][j]); } } return (EXIT_SUCCESS); }

Problem decreasing the size of a stack in c

This program is an exercise to work with stacks, it's all right, but when I decrease stack size to delete the last term it ap ... case 3: flag=0; break; } } while(flag); printf("Programa finalizado ! " ); scanf("%*i",&opc); }

Error: stack smashing detected

I am having the error: * stack smashing detected * : terminated in my program I use the G ++ compiler (Ubuntu 7.5.0-3 ... lt; "=" << endl; } return 0; } The input I put is: 10 5 18 11 1 18, it should return C, but it returns F.

C-Stack Smashing Detected - how to properly initialize a graph by adjacency list and insert edges?

I am receiving, sporadically and without having made any changes to the code or input, an error called Stack Smashing Detecte ... g1); insereAresta(3, 5, 1, &g1); insereAresta(4, 5, 1, &g1); */ printf("Compilou carajo!\n"); return 0; }

Handling batteries in C

I am a beginner in C and have the following exercise: The parking lot here contains a single mall that holds up to ten ... to, &carro, placaAux, manobraAux); } } If anyone can help with any tips on how to proceed, I appreciate it.