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]);
Complexity : How do the resource needs of a program or algorithm scale (the growth of resource requirements as a function of input). In other words, what happens with the performan
Graph terminologies : Adjacent vertices: Two vertices a & b are said to be adjacent if there is an edge connecting a & b. For instance, in given Figure, vertices 5 & 4 are adj
Explain the term totalling To add up a series numbers the subsequent type of statement must be used: Total = total + number This literally means (new) total = (old) t
1. Show the effect of each of the following operations on queue q. Assume that y (type Character) contains the character ‘&’. What are the final values of x and success (type boole
By taking an appropriate example explain how a general tree can be represented as a Binary Tree. C onversio
Explain about the Structured types - Built-In Types Values of the carrier set are not atomic, consisting rather than several atomic values arranged in some way. Common illu
Double Linked List In a doubly linked list, also known as 2 way lists, each node is separated into 3 parts. The first part is called last pointer field. It has the address of t
Q. Explain any three methods or techniques of representing polynomials using arrays. Write which method is most efficient or effective for representing the following polynomials.
Assertions and Abstract Data Types Even though we have defined assertions in terms of programs, notion can be extended to abstract data types (which are mathematical entities).
Let us assume a file of 5 records that means n = 5 And k is a sorted array of keys of those 5 records. Let key = 55, low = 0, high = 4 Iteration 1: mid = (0+4)/2 = 2
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