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) Describe the steps involved in the process of decision making under uncertainty. (b) Explain the following principles of decision making: (i) Laplace, (ii) Hurwicz. (c
Abstract Data Types :- A useful tool for specifying the logical properties of a data type is the abstract data type or ADT. The term "abstract data type" refers to the basic mathem
In the array implementation of the lists, we will use the array to hold the entries and a separate counter to keep track of the number of positions are occupied. A structure will b
Efficiency of Linear Search How much number of comparisons is there in this search in searching for a particular element? The number of comparisons based upon where the reco
A full binary tree with n leaves have:- 2n -1 nodes.
Program gives the program segment by using arrays for the insertion of an element to a queue into the multiqueue. Program: Program segment for the insertion of any element to t
I am looking for assignment help on the topic Data Structures. It would be great if anyone help me.
A graph is a mathematical structure giving of a set of vertexes (v1, v2, v3) and a group of edges (e1, e2, e3). An edge is a set of vertexes. The two vertexes are named the edge en
B i n a ry Search Algorithm is given as follows 1. if (low > high) 2. return (-1) 3. mid = (low +high)/2; 4. if ( X = = a [mid]) 5. return (mid); 6.
Using the cohen sutherland. Algorithm. Find the visible portion of the line P(40,80) Q(120,30) inside the window is defined as ABCD A(20,20),B(60,20),C(60,40)and D(20,40)
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: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd