Question
#define MAX 10
struct STACK
{
int arr[MAX]
int top = ___________;
}
a.
0
b.
-1
c.
Garbage
d.
1
Posted under Data Structures and Algorithms
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Consider Stack is implemented using the array. What will be the initial value with which top is initialized.
Similar Questions
Discover Related MCQs
Q. User perform following operations on stack of size 5 then -
push(1);
pop();
push(2);
push(3);
pop();
push(2);
pop();
pop();
push(4);
pop();
pop();
push(5);
Which of the following is correct statement for stack ?
View solution
Q. What will be the postfix expression for following infix expression:
b * c + d / e
View solution
Q. What will be the postfix expression for following infix expression -
A / B ^ C - D
View solution
Q. What will be the postfix expression for following infix expression -
A + B * C ^ D
View solution
Q. Evaluate Postfix expression from given infix expression.
A + B * (C + D) / F + D * E
View solution
Q. Expression in which Operator is written after Operand is called as ________.
View solution
Q. Which of the following is an example of Postfix expression ?
View solution
Q. Convert the following infix expression to postfix expression -
A / B ^ C + D * E - A * C
View solution
Q. Convert the following infix expression to postfix expression -
B * C - C + D / A / ( E + E )
View solution
Q. In Computer generally _________ expressions are preferred.
View solution
Q. Data Structure required to evaluate infix to postfix is __________.
View solution
Q. What will be the postfix form of the above expression -
(A+B)∗(C∗D-E)∗F/G
View solution
Q. If the sequence of operations -
push(1)
push(2)
pop
push(1)
push(2)
pop
pop
pop
push(2)
pop
are performed on a stack, the sequence of popped out values are ?
View solution
Q. Stack cannot be used to
View solution
Q. Expression
1 * 2 ^ 3 * 4 ^ 5 * 6
is evaluated as -
View solution
Q. Which of the following is useful in the implementation of quick sort ?
View solution
Q. List of data in which element can be inserted and removed at the same end is called as __________.
View solution
Q. Adding element to stack means ___________.
View solution
Q. Pushing element in the stack means _____________.
View solution
Q. Post fix form of following infix expression is -
(A + B) * (C + D - E) * F
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Data Structures and Algorithms? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!