@root: Hello root, thanks for your detailed reply. Regarding the array implementation of stack, I do have an idea that stacks can be implemented that way - however I haven't tried it yet bcoz I want...
Type: Posts; User: Shyam Raj
@root: Hello root, thanks for your detailed reply. Regarding the array implementation of stack, I do have an idea that stacks can be implemented that way - however I haven't tried it yet bcoz I want...
@Andreas - By specifying a void pointer, we can push an element of any type isn't it? Like a char/int/float. The program needn't be changed everytime. That was the idea behind this. Is it wrong?
@root - you said try using a recursive function to print the stack, and I think I've done it that way. How else can the stack be printed?
Andreas and root: Thanks for your comments: I modified it and now it's working fine. Below is the code:
void print(STACK_NODE *temp)
{
if(temp == NULL)
{
return;
...
Can someone else help me with this?
@christop - That's exactly what I thought. But I know no other way to print the stack. Any help on this one?
Hello, I've been learning stack ADT from one of the books and I've written the following stack programs which works fine if the "print(stack)" is called after "popStack(stack)."
However if I call...