Data Structures
Data Structures
a) Templates parameters
b) Member types
c) Container adaptors
d) Function
Ans container adaptors
3. Different types of Queues are
a) Circular queue
b) Priority queue
c) Doubly ended queue
d) All of the above
Ans : - all of the above
4. To implement a stack, how many ques are required?
a) One b. two
C. three d. four
Ans : two
ans deletion can be made from both ends, but insertion can be made at one end only.
locations to store every data item of array iii .Once the size of the Array is defined,
a. i and ii
b. ii and iii
c. I and iii
d. Iv
Ans iv
2. How many type array there:-
a. 1-D array
b. 2-D array
c. Multidimensional array
d. All the above
Ans All the above
3. How to represent array elements in the code :-
a. int marks[5]; b. int marks[6]={19,2,10,8,61); arr[0]=9; arr[1]=1;
arr[2]=4; arr[3]=18; arr[4]=15;
printf("%d %d %d",a,b,c);
}
a. 2,2,2
b. 3,2,16
c. 2,3,16
d. 2,3,2
Ans 3,2,16
9. What will be the output of code?
int main()
{
char a;
char arr[7] = {10,11,12,13,14,15,17};
a. = (arr+3) [3];
printf("%d",a);
}
a. 12
b. 13
c. 15
d. 17
Ans 17
10. What is the maximum dimension that an array can have is :-
a. theoretically it has no limit but
practically limit depends on memory
b. depends on multidimensional array
c. 1-D array
d. None
Ans theoretically it has no limit but
practically limit depends on memory
1. Which among the following is true about Stack?
I: These are abstract data structures
II: These follows the LIFO order
III. Insertion and deletion is performed at one end only a.
I and ii
b. Ii and iii
c. I and iii
d. I,ii,iii
Ans I,ii,iii
2. Insertion of an element in the stack is called----
a. Load
b. Fill
c. Push
d. Pop
subtree
b. Subtracting the height of the left subtree from the height of the right subtree