0% found this document useful (0 votes)
106 views

AZ4030-Subject - 3 KS 04 - 3 KE 04 - Data Structures - Year - B.E. Third Semester (Computer Science & Engineering) (CBCS) Winter 2020

1) This document appears to be an exam for a Data Structures course consisting of 16 multiple choice questions. 2) The exam is out of a total of 60 marks and the student obtained a total of 182 marks. 3) The exam contains questions related to data structures concepts like arrays, queues, stacks, trees, strings and structures. It evaluates the student's knowledge of time complexity, memory allocation and operations related to these data structure topics.

Uploaded by

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

AZ4030-Subject - 3 KS 04 - 3 KE 04 - Data Structures - Year - B.E. Third Semester (Computer Science & Engineering) (CBCS) Winter 2020

1) This document appears to be an exam for a Data Structures course consisting of 16 multiple choice questions. 2) The exam is out of a total of 60 marks and the student obtained a total of 182 marks. 3) The exam contains questions related to data structures concepts like arrays, queues, stacks, trees, strings and structures. It evaluates the student's knowledge of time complexity, memory allocation and operations related to these data structure topics.

Uploaded by

Mickey Mouse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Total Pages : 7 AZ - 4030

Total Marks Obtained : Invigilator Signature :

Name of Exam : B.E. Third Semester (Computer Science & A


B
C
D
Engineering) (CBCS) Winter 2020
3 KS 04 / 3 KE 04 : Data Structures
Time : 1 Hour Maximum Marks : 60

Roll No. ______________________ Enrolment No. : _____________________

College Code : _________________ Center Code : _____________________

------------------------------------------------------------------------------------
Note : 1) Solve 30 MCQs out of 40 MCQs.
2) Every question carries 2 marks.
3) For offline examination please tick ( ✓ ) the correct option.
4)
2
All officer Incharge / Invigilator should write College Code &
Center Code, on this page.
------------------------------------------------------------------------------------
48
1) Evaluate the prefix notation Q : +, -, *, 4, 2, /, 16, 4, 5 B
182
A) 7 B) 9 89
C) 11 D) 10
2) Consider an array A[-14............62] is stored in memory whose base address is 472 and word C
2321
size is 2 byte. Find memory location of A[11]. 940
A) 524 B) 486
C) 522 D) 496
3) To implement stack using queue, minimum how many queues are required ? C
312
A) 4 B) 3 450
C) 2 D) 1
4) Void fun_fun (int n) A
4236
{ 80
int i, j;
for ( i = 1; i < = n/4; i ++)
for (j = 1; j < = n ; j + = 4)
printf ("Have fund \n");
}
what is the time complexity of the above program.
A) O(N2) B) O(2N)
C) O(2N2) D) O(1)

1
AZ - 4030
5) What is the output of the following program / code which includes Null pointer. C
5427
int main ( ) 3
{
int + ptr = Null;
printf ("%d", ptr) ;
return 0;
}
A) Null B) Garbage value
C) O D) Zero
6) What is the size of following NULL pointer ? D
622
int main ( ) 63
{
printf ("%d", sizeof (NULL)) ;
return O ;
}
A) O 2 B) NULL
C) 4 D) Depends on platform / machine
7) Void func (int n) B
7462
48
{ 01
int i, j, k, count = O
for (i = n/2, i < = n; i++)
for (j = 1; j + n/2 < n ; j++)
for (k = 1; k < = n ; k = k * 2)
count ++ ;
}
Find the time complexity of the program
A) O (n log n) B) O (n2 log n)
C) O (n2) D) O (n log n2)
8) If you are allocating memory for an array during compile time then - D
851
A) Size of array is fixed B) Size is fixed at the time of declaration 6
C) User cannot change the size of the array at run time
D) All of the above
9) Memory allocated by calloc function is initialized to ------------- A
9319
A) zero B) Garbage value 0
C) -1 D) none of the above
10) Queues can be implemented using ----------- C
1232
A) Static array B) Dynamic array 046
C) Both A & B D) None of these

2
AZ - 4030
11) Consider the following tree A
133
1382
8

9 10

11 12 13 14

If the post order traversal gives f b + ad ** then the label of the nodes 8, 9, 10, 11, 12, 13, 14
will be ------- ?
A) *, +, *, f, b, a, d B) f, +, b, *, a, *, d
C) f, b, a, d, +, *, * D) +, f, b, *, *, a, d
12) Each element of B(-15.........40, 15.........40) requires 2 byte of storage. If the base address of B
1232
array is 970. Find the address of B(-2, 25) in CMO. 25
A) 2008 B) 2118
C) 2078 D) 2448
2
13) A structure is of the form :
If condition, then :
B
113
308
48
[Module A]
Else :
[Module B]
[End of if structures]
What is this structure ?
A) Multiple Alternative B) Double Alternative
C) Single Alternative D) None of the above
14) ----------- signs are used to signal the end of the string. D
141
A) $ B) & 460
C) && D) $$
15) To access a substring from a given string requires ----------- D
1313
A) the name of string or string itself B) the length of substring 5270
C) the position of first character of the substring in the given string
D) All of the above

3 P.T.O.
AZ - 4030
16) Suppose S1 = "JAMES" & S2 = "CARL" then to achieve output as JAMES CARL which of C
121
the following function will be used. 6135
1. S1 // S2
2. S1 // ' ' // S2
3. Strcat (Strcat (S1, " "), S2) ;
4. Strcat (S1, " ", S2)
A) Statement 2 & 4 is correct B) Statement 1 & 4 is correct
C) Statement 2 & 3 is correct D) Statement 1 & 2 is correct
17) How many attributes / parameters are needed to write / design a procedural algorithm for A
163
push operation of a stack ? 754
A) 5 B) 4
C) 6 D) 3
18) If you need to sort any 28 random numbers. You should prefer ----------- B
1321
A) quick sort B) bubble sort 8478
C) merge sort D) heap sort
19) What is the maximum number of comparisons need to sort 8 (Eight) decimal number of 3 D
131

A) 280
C) 38
2
(three) digits -------- ?
B) 40
D) 240
93
48
20) Consider the sequence of operation B
231
push (1), push (2), push (2), pop, pop, 061
push (2), push (1), push (3), pop, pop,
push (3), pop pop, pop are performed on a stack the sequence of popped out values are :
A) 2, 2, 1, 3, 2, 3, 1 B) 2, 2, 3, 1, 3, 2, 1
C) 2, 2, 1, 3, 3, 2, 1 D) 2, 2, 3, 1, 2, 3, 1
21) A perfect binary tree whose height is 'h' has -------- node. C
21
A) 2h B) 2h + 1 1567
C) 2h - 1 D) 2h - 2
22) A full binary tree is a unique binary tree where every node except the -------- node has two A
2171
children 239
A) external B) internal
C) lowest D) none of these

4
AZ - 4030
23) Identify the cut vertices from the given graph. D
234
329
A E

B C

A) B and E B) A & B
C) A and E D) D and E
24) Which of the following statement is true about the given graph ? C
292
417
A
B

C
2
A) G is a complete graph
E

B) G is a connected graph
48
C) The vertex connectivity of a graph is 2 D) The edge connectivity of the graph is 1
25) Select correct statement / properties that a simple graph does not hold. A
2532
A) Must be connected B) Must be unweighted 526
C) Must have no loops or multiple edges D) Must have no multiple edges
26) Convert the following infix to prefix notation ? D
293
I = (D - E / F) * (D / K - L) 601
A) * - DEF / - / DKL B) * - DE / F - / DKL
C) * - DE / F / - DKL D) * - D/EF - / DKL
27) Consider a queue of size = 7, and If (front = = rear) then - B
273
A) Queue is full B) Queue is empty 748
C) Queue contains '1' element D) None of the above
28) Which of the following algorithm is having worst-case time complexity as O (n log n) C
2313
A) Bubble sort B) Heap sort 803
C) Merge sort D) Quick sort
29) Circular linked list may lead to ------------ A
232
A) Infinite loop B) Time consuming traverse 918
C) Requires more memory space D) All of the above
30) Which is the efficient data structure in tree construction --------- ? D
3213
A) Stack B) Queue 0945
C) Array D) Linked list
5 P.T.O.
AZ - 4030
31) Which of the following is a valid topological sorting ? D
3123
1206
A C

B D

A) A B C D B) B A C D
C) B A D C D) A B D C
32) The advantage of sorting is -------- D
32
A) Report generation B) Making searching easier & efficient 252
C) Responding to queries Easily D) All of the above
33) The number of possible binary trees with 3 nodes & 4 nodes respectively are ----- & ------- C
3143
A) 12 & 12 B) 13 & 13 317
C) 5 & 14 2 D) 15 & 15
34) T(n) represents the running time, where 'n' is the input size of a recursive algorithm. T(n) is B
defined as follows :
3121
4582
48
T(n) = C + T(n - 1) , if n > 1
= d, if n  1
the order of this algorithm is
A) n2 B) n
3
C) n D) nn
35) Consider the tree A
33
579
6

4 12

1 5 10 30

11

If this tree is used for sorting, then a number 8 should be placed as the ---------
A) left child of the node labeled 10 B) left child of the node labeled 30
C) right child of the node labeled 5 D) right child of the node labeled 30

6
AZ - 4030
36) Depth-first-search can be consider similar / same as : B
315
A) Inorder B) Preorder 61
C) Postorder D) Linear order
37) In a simple graph, what is the maximum degree of any vertex with n vertices is ---------- B
31
A) n B) n - 1 724
C) n + 1 D) 2n - 1
38) Consider a regular graph of degree and d and vertices n. The number of edges in a graph is B
312
------------ 8794
A) n + d B) nd/2
C) nd D) (n2 - d) - 1
39) Evaluate the prefix notation B
3218
Q : *, +, -, 6, 2, *, +, 5, 2, 7 979
A) 25 B) 126
C) 186 D) 157
40) Consider an array A[-8 ........ 76] is stored in memory whose base address is 288 and word D
424
size is 4 byte. At which memory location, we will find element A[23]
2 0320
A) 422 B) 432
C) 452 D) 412
48
**********************

7 P.T.O.

You might also like