Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
include
int choice, stack[10], top, element;
void menu();
void push();
void pop();
void showelements();
void main()
{
choice=element=1;
top=0;
menu();
}
void menu()
printf("Enter any options from following:\n");
printf("PUSH 1\n POP 2\n DISPLAY ELEMENTS 3\n EXIT 4\n");
scanf("%d", &choice);
if (choice==1)
push();
if (choice==2)
pop();menu();
if (choice==3)
showelements();
void push()
if (top<=9)
printf("Enter any element to be pushed to stack:\n");
scanf("%d", &element);
stack[top]=element;
++top;
else
printf("Stack full\n");
return;
void pop()
if (top>0)
--top;
element = stack[top];
printf("Popped element:%d\n", element);
printf("Stack empty\n");
void showelements()
if (top<=0)
for(int i=0; i printf("%d\n", stack[i]); }
printf("%d\n", stack[i]);
Add -75to+25 in 2s complement
Here is a diagram showing similarities between documents; this is an actual set of physics lab assignments from a large university. Each node (square) in the graph is a doc
Step-1: For the current node, verify whether it contain a left child. If it has, then go to step-2 or else go to step-3 Step-2: Repeat step-1 for left child Step-3: Visit (th
Column Major Representation In memory the second method of representing two-dimensional array is the column major representation. Under this illustration, the first column of
Binary Space Partition A binary space-partitioning (BSP) tree is an efficient method for determining object visibility by painting surfaces onto the screen from back to front,
Asymptotic Analysis Asymptotic analysis is depending on the idea that as the problem size grows, the complexity can be defined as a simple proportionality to some known functio
. Create a decision table that describes the movement of inventory
What values are automatically assigned to those array elements which are not explicitly initialized? Garbage values are automatically assigned to those array elements that
What is an unreachable code assertion An unreachable code assertion can be placed at the default case; if it's every executed, then program is in an erroneous state. A loop in
In this unit, we described about the data structure Queue. It had two ends. One is front from where the elements can be removed and the other is rear where the elements can be inse
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd