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]);
A connected graph is a graph wherein path exists among every pair of vertices. A strongly connected graph is a directed graph wherein every pair of distinct vertices is connecte
Your objective is to write a generic doubly linked list class called CS228LinkedList that implements the List interface and uses a type variable T. All methods except for subList a
Determine about the push operation A Container may or may not be accessible by keys, so it can't make assumptions about element retrieval methods (for example, it cannot have a
This algorithm inputs 3 numbers, every number goes through successive division by 10 until its value is less than 1. An output is produced which comprise the number input and a val
Linear search employee an exhaustive method of verified each element in the array against a key value. Whereas a match is found, the search halts. Will sorting the array before uti
List areutilized to maintainPOLYNOMIALS in the memory. For example, we have a functionf(x)= 7x 5 + 9x 4 - 6x³ + 3x². Figure depicts the representation of a Polynomial by means o
Two linked lists are having information of the same type in ascending order. Write down a module to merge them to a single linked list that is sorted merge(struct node *p, stru
extra key inserted at end of array is called
code for count and display
What is a linear array? An array is a way to reference a series of memory locations using the similar name. Every memory location is shown by an array element. An array elemen
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