What do you mean by stack program?
Get me an example stack program?

Answer Posted / manoj singh

stac program is called whose as provide the lifo mens last input first output .when we putdown the value in node thats called pop and flow out the value thats called push.

char stack[10]
int top=-1;
void push(char d)
{
if(to==9)
printf("stack is full");
else
stack[++top]=d;
}
char pop()
{
if(top==-1)
return('\0')
else
return(stack[top--]);
}
//stack is create both performance pop and push.

Is This Answer Correct ?    8 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which is better struts or spring?

604


What is the difference between abstraction and polymorphism?

598


What is data binding in oops?

572


What is object in oop with example?

682


What is overloading in oops?

585






What is abstraction and encapsulation?

560


What is encapsulation with real life example?

554


Are polymorphisms mutations?

687


Write a program to reverse a string using recursive function?

1778


Explain virtual inheritance?

675


What is oops concept with example?

566


What is super in oop?

582


Write a java applet that computes and displays the squares of values between 25 and 1 inclusive and displays them in a TextArea box

2019


can inline function declare in private part of class?

3637


Why is polymorphism used?

571