0% found this document useful (0 votes)
12 views5 pages

Incorrect Statements About Stacks

The document consists of a series of questions related to data structures, including definitions, advantages, disadvantages, and applications of various types such as arrays, stacks, queues, and trees. It covers topics like recursion, expression evaluation, and specific data structure properties. The questions are designed to test knowledge on the characteristics and uses of different data structures in programming.

Uploaded by

Faridullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views5 pages

Incorrect Statements About Stacks

The document consists of a series of questions related to data structures, including definitions, advantages, disadvantages, and applications of various types such as arrays, stacks, queues, and trees. It covers topics like recursion, expression evaluation, and specific data structure properties. The questions are designed to test knowledge on the characteristics and uses of different data structures in programming.

Uploaded by

Faridullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

1. What is a data structure?

a) A programming language
b) A collection of algorithms
c) A way to store and organize data
d) A type of computer hardware
View Answer

2. What are the disadvantages of arrays?


a) Index value of an array can be negative
b) Elements are sequentially accessed
c) Data structure like queue or stack cannot be implemented
d) There are chances of wastage of memory space if elements inserted in an
array are lesser than the allocated size
View Answer

3. Which data structure is used for implementing recursion?


a) Stack
b) Queue
c) List
d) Array
View Answer

4. The data structure required to check whether an expression contains a


balanced parenthesis is?
a) Queue
b) Stack
c) Tree
d) Array
View Answer

5. Which of the following is not the application of stack?


a) Data Transfer between two asynchronous process
b) Compiler Syntax Analyzer
c) Tracking of local variables at run time
d) A parentheses balancing program
View Answer

advertisement

6. Which data structure is needed to convert infix notation to postfix


notation?
a) Tree
b) Branch
c) Stack
d) Queue
View Answer

7. What is the value of the postfix expression 6 3 2 4 + – *?


a) 74
b) -18
c) 22
d) 40
View Answer

8. What data structure would you mostly likely see in non recursive
implementation of a recursive algorithm?
a) Stack
b) Linked List
c) Tree
d) Queue
View Answer

9. Which of the following statement(s) about stack data structure is/are NOT
correct?
a) Top of the Stack always contain the new node
b) Stack is the FIFO data structure
c) Null link is present in the last node at the bottom of the stack
d) Linked List are used for implementing Stacks
View Answer

10. The data structure required for Breadth First Traversal on a graph is?
a) Array
b) Stack
c) Tree
d) Queue
View Answer

11. The prefix form of A-B/ (C * D ^ E) is?


a) -A/B*C^DE
b) -A/BC*^DE
c) -ABCD*^DE
d) -/*^ACBDE
View Answer

12. Which of the following points is/are not true about Linked List data
structure when it is compared with an array?
a) Random access is not allowed in a typical implementation of Linked Lists
b) Access of elements in linked list takes less time than compared to arrays
c) Arrays have better cache locality that can make them better in terms of
performance
d) It is easy to insert and delete elements in Linked List
View Answer

13. Which data structure is based on the Last In First Out (LIFO) principle?
a) Tree
b) Linked List
c) Stack
d) Queue
View Answer

14. Which of the following application makes use of a circular linked list?
a) Recursive function calls
b) Undo operation in a text editor
c) Implement Hash Tables
d) Allocating CPU to resources
View Answer

15. What is a bit array?


a) Data structure that compactly stores bits
b) Data structure for representing arrays of records
c) Array in which elements are not present in continuous locations
d) An array in which most of the elements have the same value
View Answer

16. Which of the following tree data structures is not a balanced binary tree?
a) Splay tree
b) B-tree
c) AVL tree
d) Red-black tree
View Answer

17. Which of the following is not the type of queue?


a) Priority queue
b) Circular queue
c) Single ended queue
d) Ordinary queue
View Answer
18. Which of the following data structures can be used for parentheses
matching?
a) n-ary tree
b) queue
c) priority queue
d) stack
View Answer

19. Which algorithm is used in the top tree data structure?


a) Backtracking
b) Divide and Conquer
c) Branch
d) Greedy
View Answer

20. What is the need for a circular queue?


a) easier computations
b) implement LIFO principle in queues
c) effective usage of memory
d) to delete elements based on priority
View Answer

21. Which of the following is the most widely used external memory data
structure?
a) B-tree
b) Red-black tree
c) AVL tree
d) Both AVL tree and Red-black tree
View Answer

22. Which of the following is also known as Rope data structure?


a) Linked List
b) Array
c) String
d) Cord
View Answer

23. What will be the output of the following program?

main()

char str[]="san foundry";


int len = strlen(str);

int i;

for(i=0;i<len;i++)

push(str[i]); // pushes an element into stack

for(i=0;i<len;i++)

pop(); //pops an element from the stack

a) yrdnuof nas
b) foundry nas
c) sanfoundry
d) san foundry
View Answer

24. Which of the following data structure can provide efficient searching of
the elements?
a) binary search tree
b) unordered lists
c) 2-3 tree
d) treap
View Answer

25. What is an AVL tree?


a) a tree which is unbalanced and is a height balanced tree
b) a tree which is balanced and is a height balanced tree
c) a tree with atmost 3 children
d) a tree with three children

You might also like