Ds and Algo Question 2
Ds and Algo Question 2
a) A programming language
b) A collection of algorithms
c) A way to store and organize data
d) A type of computer hardware
1. #include <stdio.h>
2. int main()
3. {
4. int arr[5]={10,20,30,40,50};
5. printf("%d", arr[5]);
6.
7. return 0;
8. }
A. Garbage value
B. 10
C. 50
D. None of the above
4. Convert the infix to postfix for A-(B+C)*(D/E)
A. ABC+DE/*-
B. ABC-DE/*-
C ABC-DE*/-
E. None of the above
5. The prefix of (A+ B) * (C-D) is
A +-AB*(C-D)
B * +-ABCD
C * +AB-CD
D *AB+ CD
6. linear collection of data elements where the linear node is given by means of pointer is called?
a) Linked list
b) Node list
c) Primitive list
d) Unordered list
9. In a stack, if a user tries to remove an element from empty stack it is called _________
a) Underflow
b) Empty collection
c) Overflow
d) Garbage Collection
12. The data structure required for Breadth First Traversal on a graph is?
a) Array
b) Stack
c) Tree
d) Queue
20. The maximum number of binary trees that can be formed with three unlabeled nodes is:
a) 1
b) 5
c) 4
d) 3
22. From the following code identify the which traversal of a binary tree is this __________
a) Inorder traversal
b) preorder traversal
c) postorder traversal
d) Euler tour traversal