C-Dynamic Memory Allocation and Data Structure Questions and Answers
Practice ModeShowing 10 of 104 questions
Q81
The operation for removing an entry from a stack is traditionally called:
Answer: Option C
Q82
Which of the following applications may use a stack ?
Answer: Option D
Q83
Which of the following stack operations could result in stack undeflow/
Answer: Option B
Q84
Consider the well formed strings : (( )) (( )) ( ) ) and not well formed strings: ( ( ). Which of the data structure can be implemented to solve the problem:
Answer: Option A
Q85
Consider the following pseudocode:
declare a stack of characters
while (there are more characters in the word to read)
{
read a character
push the character on the stack
}
while (the stack is not empty)
{
write thestack's top character to the screen
pop a character off the stack
}
What is written to the screen for the imput "carpets"?
Answer: Option C
Q86
the postfx notation is also called
Answer: Option A
Q87
Consider th usual algorithm for determining whether a sequence of parentheses is balanced. suppose that contains 2 left parentheses and 3 right parentheses (in some order). What is the maximum number of parentheses that will ever appear on the stack AT ON TIME during the computation ?
Answer: Option B
Q88
Consider the usual algorithm for determining whether a sequence of parentheses is balanced. Wht is the maimum numbef of parentheses that will appear on the stack AT ANY ONE TIME when the algorithm analyzes: ( ) ) ( ( )) ( ( )) )
Answer: Option C
Q89
Adding an element to the stack means
Answer: Option B
Q90
Suppose we have an array implementation of the stack class, with ten items in the stack stored at data [0] through data [9]. The CAPACITY is 42. where does the push member function place the new entry in the aray?
Answer: Option D