SlideShare a Scribd company logo
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 2 of 24 
SECTION A 
OBJECTIVE (50 MARKS) 
INSTRUCTION: 
This section consists of FORTY (40) objective questions. Answer ALL questions in the answers booklet. 
1. 
A structure can contain ___________ data type. [CLO 1] 
A. 
Unique 
B. 
C. 
D. 
Only 
Many 
Only one 
2. 
A data structure can be defined as: [CLO 1] 
A. 
a collection of data elements of the same type that are referenced by a common name. 
B. 
a collection of related data items stored and referenced under one name. 
C. 
a variable containing the address of another variable. 
D. 
a collection of nodes, where each node contains a data along with information about the next node. 
3. 
A data structure where elements can be added or removed at either end but not in the middle. [CLO 1] 
A. 
Linked lists 
B. 
Stacks 
C. 
Queues 
D. Dequeue
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 3 of 24 
4. 
Code given is an initialized data structure. [CLO 1] English.price = 29.90; 
The operator ‘.’ in the code can be replaced with 
A. 
English=> price=29.90 
B. 
EnglishPrice=29.90 
C. 
English-> price=29.90 
D. 
English price=29.90 
5. 
The keyword _____ can be useful to define an alias for a type that is frequently used within a program. It is also useful when the type that you want to use has a name that is too long or confusing. [CLO 1] 
A. struct 
B. typedef 
C. define 
D. include
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 4 of 24 
6. 
The following codes refer to a data structure definition and declaration. Another way of writing the statement are: [CLO 2] 
struct book{ 
int pages; 
float price; 
}; 
struct book Maths, Science; 
A. 
struct book 
{ 
int pages; 
float price; 
} Maths, Science; 
B. 
struct book Maths, Science 
{ 
int pages; 
float price; 
}; 
C. 
struct book Maths, book Science 
{ 
int pages; 
float price; 
}; 
D. 
struct book{ 
int pages; 
float price; 
};
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 5 of 24 
7. 
Below is a definition and declaration using array of data structures, 
struct employees { 
char id[5], gender, name[25]; 
int age; 
} staff[50]; 
Which one of the following statement is to print or access the name of the seventh staff? [CLO 2] 
A. 
cout<<staff[6].name; 
B. 
cout<<staff[7].name; 
C. 
cout<<staff7.name; 
D. 
cout<<staff.name7; 
8. 
Which of the following code is used to initialize all the student genders to blanks and their ages to 0? [CLO 2] 
for( i=0; i<50; i++) 
A. 
{ 
stud[i].gender =[ ]; 
stud[i].age = 0; 
} 
B. 
{ 
stud[i].gender = ‘ ’; 
stud[i].age = 0; 
}
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 6 of 24 
C. 
{ 
stud[i].gender =0; 
stud[i].age = 0; 
} 
D. 
{ 
stud[i]gender = ‘ ’; 
stud[i]age = 0; 
} 
9. 
Which one of the following structure declaration are suitable to the given information below: [CLO 2] 
“An express bus has details of bus number, fare, driver name, number of passenger and destination”. 
The structure object name are Transnational, Konsortium , Seri Maju. 
A. 
struct Express_bus 
{ 
int numb_bus; 
float fare; 
int driver_name[5]; 
int numb_passenger; 
int destination [10]; 
} Transnational, Konsortium , Seri Maju;
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 7 of 24 
B. 
struct Express_bus 
{ 
int numb_bus; 
float fare; 
char driver_name[5]; 
int numb_passenger; 
char destination [10]; 
} Transnational, Konsortium , Seri Maju; 
C. 
struct Express_bus Transnational, Konsortium , Seri Maju 
{ 
int numb_bus; 
float fare; 
char driver_name[5]; 
int numb_passenger; 
char destination [10]; 
}; 
D. 
struct Express_bus 
{ 
int numb_bus; 
float fare; 
char driver_name[5]; 
int numb_passenger; 
char destination [10]; 
Transnational, Konsortium , Seri Maju 
};
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 8 of 24 
10. Choose from the following the simplest method to implement a list abstract data 
type. [CLO 1] 
A. Linked list 
B. Structure 
C. Pointer 
D. Array 
11. “Linked list is a method to overcome the problem of array that cannot allow 
alteration on it once the program is running.” [CLO 1] 
Select a correct statement to justify this statement. 
A. A linked list can be used to manage a dynamically growing and shrinking list of data. 
B. A linked list is used to chain a collection of data. 
C. A linked list reallocating the array as needed by adding elements at a time. 
D. A linked list is slow, in efficient and expensive to use. 
12. Identify the code that has similar function to the following code. [CLO 1] 
typedef int WAH; 
WAH k; 
A. typedef k 
B. char k 
C. int k 
D. int *k
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 9 of 24 
13. Which of the following will point to the first node of the linked list? [CLO 1] 
A. Head 
B. Tail 
C. New 
D. Next 
14. Match the correct following portion of linked list with the correct function. 
[CLO 1] 
Codes Purpose X 
(*p).data I 
Access the pointer field Y 
Pnext Z 
(*p).next II 
Access the data field W 
pdata 
A. X + I, Y + I, Z + II, W+II 
B. X + II, Y + I, Z + II, W + I 
C. X + II, Y + I, Z + I, W + II 
D. X + II, Y + II, Z + I, W + I 
15. Choose an appropriate coding commonly used to delete an item in a record. 
[CLO 2] 
A. Prev = curnext 
B. Node Ptr Result = NULL; 
C. Node Ptr Result = DELETE; 
D. Delete cur;
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 10 of 24 
16. 
________ is a LIFO (Last In First Out) data structure concept where the first data that being inserted will be the last data to delete. [CLO 1] 
A. 
Queue 
B. 
Searching 
C. 
Stack 
D. 
Array 
17. 
Figure 1 
Which operation would you use to return the Applied Math book from the stack above (Figure 1)? [CLO 1] 
A. 
Top 
B. 
Pop 
C. 
Push 
D. 
None of the above
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 11 of 24 
18. 
Based on Figure 2 below, what is the value that will be on the top of the stack after all of the operation being executed? [CLO 2] 
i. J->data[J->top]=45; 
ii. J->data[J->top]=30; 
iii. J->top--; 
Figure 2 
A. 
30 
B. 
45 
C. 
70 
D. 
50 
19. 
When new data are to be inserted into a data structure, but there is no available space, this situation is usually called? [CLO 1] 
A. underflow 
B. 
housefull 
C. 
overflow 
D. 
saturated
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 12 of 24 
20. 
Hafeez and his friends are going to watch ‘The Smurf’ at AEON Bukit Tinggi Klang. He is going to buy six tickets. He arrives early and is the first in a line, other people after him stay behind. Hafeez is currently implementing ________ concept. [CLO 2] 
A. 
Queue 
B. 
Stack 
C. 
Trees 
D. 
Linked List 
21. 
Which of the following is the function of delete Queue? [CLO 1] 
A. 
uses one queue to delete another 
B. 
deletes all instances of the queue 
C. 
copies the queue into backup memory 
D. 
removes all elements from the queue leaving an empty queue 
22. 
The first element inserted into a queue is the first element to be removed. For this reason, a queue is sometimes called a __________, as opposed to a stack which is __________. [CLO 1] 
A. 
LIFO , FIFO 
B. 
LIFO , LIFO 
C. 
FIFO , FIFO 
D. 
FIFO , LIFO
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 13 of 24 
23. 
Which one of the examples below did not refer to the implementation of queue in a real life application? [CLO 1] 
A. 
Cars at the traffic light junction 
B. 
Clothes folded inside a wardrobe 
C. 
Documents waited to be printed at a network sharing printer 
D. 
Lines at the library counter 
24. 
The linear array of queue can caused a flowed in memory. Which one of the following types of array is use to solve this problem? [CLO 1] 
A. 
Two dimensional 
B. 
Circular 
C. 
Dynamic 
D. 
Double 
25. 
Three basic activities can be applied to array based implementation of queue are: 
[CLO 1] 
i. insert items at the rear 
ii. remove the element at the front 
iii. return whether the queue is empty or full 
iv. expand the size according to the total of value to be insert 
A. 
i, ii and iii 
B. 
i, ii and iv 
C. 
ii, iii and iv 
D. 
i, iii and iv
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 14 of 24 
26. 
If the letters ‘R’,’S,’T’,’U’,’V’,’W’ are placed in a queue respectively in the given order, and then removed one at a time, in what order will the letters be removed? [CLO 2] 
A. 
‘W’,’V’,’U’,’T’,’S’,’R’ 
B. 
‘U’,’V’,’W’,’R’,’S’,’T’ 
C. 
‘T’,’S’,’R’,’W’,’U’,’V’ 
D. 
‘R’,’S,’T’,’U’,’V’,’W’ 
27. In binary search tree, left sub-tree consist of values that are smaller than their 
parent nodes. [CLO 1] 
A. TRUE 
B. FALSE 
28. The tree of data structure is getting bigger each time a new item is added without 
we notice how many nodes are there. Provide the operation that returns the 
numbers of the nodes available. [CLO 2] 
A. Return () 
B. Children (p) 
C. Element() 
D. Size()
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 15 of 24 
29. Consider the node of a complete binary tree whose value is stored in data[i] for an 
array implementation. If this node has a right child, where will the right child's 
value be stored? [CLO 2] 
A. data[i+1] 
B. data[i+2] 
C. data[2*i + 1] 
D. data[2*i + 2] 
30. There are 8, 15, 13 and 14 nodes in 4 different trees. Analyze which one of them 
can form a full binary tree? [CLO 2] 
A. 8 
B. 15 
C. 13 
D. 14 
31. Choose the correct statements about tree data structure. [CLO 2] 
A. Given a set S of n real keys chosen at random from a uniform distribution over (a:b) a binary tree can be structured on S in O(n) expected time. 
B. In the worse case, a red-black tree insertion requires O(1) rotations. 
C. Given a connected, weighted, undirected graph G in which the edge with minimum weight is unique, that edge belongs to every minimum spanning tree of G. 
D. Deleting a node from a binary search tree on n nodes take O(lg n) time in the worse case.
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 16 of 24 
32. Point out the main disadvantageous of tree performance in searching and sorting. 
[CLO 2] 
A. Reordering the tree on removal of an element is a little more complex than in a list or stack. 
B. Worst case of tree is when all data is in a chain with no sub tree. 
C. At worst tree will be as effective for searching and sorting as a linked list, at best it will be much faster. 
D. Tree is seems not practical to be applied in solving computer organization problem. 
33. 
Finding the location of the element with a given value is: [CLO 1] 
A. 
Linked List 
B. 
Sort 
C. 
Stack 
D. 
Search 
34. 
________ sorts a list of values by repeatedly comparing neighboring elements in the list and swapping their position if they are not already in order. 
[CLO 1] 
A. 
Merge 
B. 
Insertion 
C. 
Bubble 
D. 
Quick
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 17 of 24 
35. 
[0] [1] [2] [3] [4] [5] [6] [7] [8] [9] 
list 16 30 24 7 25 62 45 5 65 50 
Figure 3 
How many key comparisons would have to be made on the list above Figure 3 to find the number 24? [CLO 3] 
A. 
1 
B. 
2 
C. 
3 
D. 
4 
36. 
Identify sorting type that match to Figure 4 below. [CLO 1] 
Figure 4 
A. 
Quick 
B. 
Merge 
C. 
Bubble 
D. 
Selection
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 18 of 24 
37. 
Below is the following list to search number 4 in Figure 5. 
6, 1, 4, 8, 3, 9 
Figure 5 
1. Compare the key (Key  4) with the first data in the row 
2. If the key is the same with the first data, so mission is accomplish do not need to search more. 
3. If key and first data not the same, need to compare the key with the second data until the mission is accomplish. 
4. If the key does not match with all of the data in the row, eliminate the process. 
According to the statement above, what is the type of searching algorithm implement to solve the problem? [CLO 2] 
A. 
Binary Search 
B. 
Linear Search 
C. 
Not Linear Search 
D. 
Binary Tree Search
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 19 of 24 
38. 
What is the correct statement that fit Linear Search and Binary Search implementation? [CLO 1] 
i. Binary Search must be in sorted condition 
ii. Linear Search must be in sorted condition 
iii. Linear Search will compare one by one with the key until it finds the same value 
iv. Binary Search will compare with the middle element of the list 
A. 
i and iii 
B. 
i, ii and iv 
C. 
i, iii and iv 
D. 
i, ii, iii and iv 
39. 
Evaluate statement 1 – 3 and choose correct statement for : [CLO 1] 
1. First, search item compared with middle element of list 
2. If the search item is less than middle element of list, restrict the search to first half of list 
3. Otherwise, search second half of list 
A. 
All True 
B. 
C. 
D. 
1 only 
1 and 2 
2 and 3 
40. 
In the linked list data structure, the insertion and deletion does not require data movement, only link value is adjusted. [CLO 1] 
A. 
True 
B. 
False
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 20 of 24 
SECTION B 
STRUCTURE/ ESSAY (50 marks) 
INSTRUCTION: 
This section consists of TWO (2) structure questions. Answer ALL questions. 
QUESTION 1 
a) Sketch a linked list diagram referred to segment code as below : 
[CLO 2] 
(4 marks) 
b) Answer the question based on the Diagram 1. Assume a variable list, 
X and Y as a pointer. 
Diagram 1 
i. Write a relational expression for X to point to the node containing 
value 23. 
ii. Write a relational expression for Y to point to the last node in the list 
[CLO 2] 
(1.5 marks) 
[CLO 2] 
(1.5 marks) 
newPtr=new mark; 
newPtr->data=90; 
newPtr->link=NULL; 
Head=newPTR; 
list 
18 32 23 
32 
16 43 
32 
87 
32 
25 
32 
44 
32 
X Y
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 21 of 24 
c) Explain TWO (2) differences between list and linked list. 
[CLO 1] 
(4 marks) 
d) Draw suitable stack diagram for each statement below. 
a. CreateStack(N); 
b. Push(70,N); 
c. Push(40,N); 
d. Pop(); 
e. Push(80,N); 
f. Pop(); 
g. Push(90,N); 
h. Push(10,N); 
[CLO 2] 
(4 marks) 
e) State FIVE (5) operation of linear linked list. Explain ONE (1) of them. [CLO 1] 
(5 marks)
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 22 of 24 
f) Write a struct declaration on Student Record based on Table 1. The records are for 
student from JTMK and JPH. Then assign value for both variable as in Table 1. 
Member of Struct 
JTMK 
JPH 
(a) student number 
17DIP10F1036 
01DEP09F1002 
(b) student name 
Quratul’ain 
Mohd Rayyan 
(c) semester 
03 
05 
(d) hpnm 
3.78 
3.50 
Table 1 
[CLO 3] 
(5 marks)
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 23 of 24 
QUESTION 2 
a) Explain the characteristic of Queue implemented using array. 
b) Describe the function of variable front and variable rear in queue. 
[CLO 1] 
(4 marks) 
[CLO 1] 
(2 marks) 
c) Based on the binary search tree in Figure 2a, draw a binary search tree if the operation involves (use the original binary search tree in Figure 2a for each operation). 
Figure 2a 
i. Delete I 
ii. Delete S 
iii. Insert K 
[CLO 2] 
(6 marks) 
S 
I 
U 
A 
L 
F 
O 
T 
Z 
Y 
W
CONFIDENTIAL FP305 DATA STRUCTURES 
Page 24 of 24 
d) Draw a binary Tree for the expression : 
i. A * B - (C + D) * (P / Q) 
ii. ( (B+C) * (D-E) ) / A 
[CLO 3] 
(8 marks) 
e) Use selections to sort the following array: {30, 60, 20, 50, 40, 10}. Show the array content after each step. 
[CLO 3] 
(5 marks)

More Related Content

What's hot

Data structure - mcqs
Data structure - mcqsData structure - mcqs
Data structure - mcqssuthi
 
Struktur Sistem Komputer
Struktur Sistem KomputerStruktur Sistem Komputer
Struktur Sistem Komputereddie Ismantoe
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)Ankit Dubey
 
Array implementation and linked list as datat structure
Array implementation and linked list as datat structureArray implementation and linked list as datat structure
Array implementation and linked list as datat structureTushar Aneyrao
 
Aggregate functions in SQL.pptx
Aggregate functions in SQL.pptxAggregate functions in SQL.pptx
Aggregate functions in SQL.pptxSherinRappai
 
JS1 COMPUTER STUDIES FIRST TERM C.A 2
JS1 COMPUTER STUDIES FIRST TERM C.A 2JS1 COMPUTER STUDIES FIRST TERM C.A 2
JS1 COMPUTER STUDIES FIRST TERM C.A 2Ejiro Ndifereke
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stackHaqnawaz Ch
 
10 set soalan
10 set soalan10 set soalan
10 set soalanamrida
 
DAC CCAT GUESS PAPER Jun-Jul 2013
DAC CCAT GUESS PAPER Jun-Jul 2013 DAC CCAT GUESS PAPER Jun-Jul 2013
DAC CCAT GUESS PAPER Jun-Jul 2013 prabhatjon
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in cUpendra Sengar
 
S2 DATA PROCESSING FIRST TERM C.A 2
S2 DATA PROCESSING FIRST TERM C.A 2S2 DATA PROCESSING FIRST TERM C.A 2
S2 DATA PROCESSING FIRST TERM C.A 2Ejiro Ndifereke
 
Latihan excel
Latihan excelLatihan excel
Latihan excelEija Jhan
 
Presentasi Dampak Positif Dan Negatif IMK
Presentasi Dampak Positif Dan Negatif IMKPresentasi Dampak Positif Dan Negatif IMK
Presentasi Dampak Positif Dan Negatif IMKHendra Deni Afriliya
 
71 Item Contoh RBT PT3
71 Item Contoh RBT PT371 Item Contoh RBT PT3
71 Item Contoh RBT PT3Michael Chin
 

What's hot (20)

Data structure - mcqs
Data structure - mcqsData structure - mcqs
Data structure - mcqs
 
Struktur Sistem Komputer
Struktur Sistem KomputerStruktur Sistem Komputer
Struktur Sistem Komputer
 
Dbms Final Examination Answer Key
Dbms Final Examination Answer KeyDbms Final Examination Answer Key
Dbms Final Examination Answer Key
 
200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)200 mcq c++(Ankit dubey)
200 mcq c++(Ankit dubey)
 
Array implementation and linked list as datat structure
Array implementation and linked list as datat structureArray implementation and linked list as datat structure
Array implementation and linked list as datat structure
 
Aggregate functions in SQL.pptx
Aggregate functions in SQL.pptxAggregate functions in SQL.pptx
Aggregate functions in SQL.pptx
 
JS1 COMPUTER STUDIES FIRST TERM C.A 2
JS1 COMPUTER STUDIES FIRST TERM C.A 2JS1 COMPUTER STUDIES FIRST TERM C.A 2
JS1 COMPUTER STUDIES FIRST TERM C.A 2
 
Advanced Trees
Advanced TreesAdvanced Trees
Advanced Trees
 
Conversion from infix to prefix using stack
Conversion from infix to prefix using stackConversion from infix to prefix using stack
Conversion from infix to prefix using stack
 
Views
ViewsViews
Views
 
Linked List
Linked ListLinked List
Linked List
 
10 set soalan
10 set soalan10 set soalan
10 set soalan
 
DAC CCAT GUESS PAPER Jun-Jul 2013
DAC CCAT GUESS PAPER Jun-Jul 2013 DAC CCAT GUESS PAPER Jun-Jul 2013
DAC CCAT GUESS PAPER Jun-Jul 2013
 
Telephone directory in c
Telephone directory in cTelephone directory in c
Telephone directory in c
 
S2 DATA PROCESSING FIRST TERM C.A 2
S2 DATA PROCESSING FIRST TERM C.A 2S2 DATA PROCESSING FIRST TERM C.A 2
S2 DATA PROCESSING FIRST TERM C.A 2
 
Latihan excel
Latihan excelLatihan excel
Latihan excel
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Presentasi Dampak Positif Dan Negatif IMK
Presentasi Dampak Positif Dan Negatif IMKPresentasi Dampak Positif Dan Negatif IMK
Presentasi Dampak Positif Dan Negatif IMK
 
Modul 05 basisdata
Modul 05 basisdataModul 05 basisdata
Modul 05 basisdata
 
71 Item Contoh RBT PT3
71 Item Contoh RBT PT371 Item Contoh RBT PT3
71 Item Contoh RBT PT3
 

Viewers also liked

FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013Syahriha Ruslan
 
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMFINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMAmira Dolce Farhana
 
Final paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingFinal paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingAmira Dolce Farhana
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer FullManas Rai
 
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012Syahriha Ruslan
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QSyahriha Ruslan
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)welcometofacebook
 
Exercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With SolutionsExercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With SolutionsFelipe Suarez
 
Chapter 1 part 1
Chapter 1 part 1Chapter 1 part 1
Chapter 1 part 1rohassanie
 
C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2Amit Kapoor
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALSyahriha Ruslan
 
Data structure-questions
Data structure-questionsData structure-questions
Data structure-questionsShekhar Chander
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1rozimm78
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna universitysangeethajames07
 
Data Structure Notes Part-1
Data Structure Notes Part-1 Data Structure Notes Part-1
Data Structure Notes Part-1 NANDINI SHARMA
 
Data structures and algorithms made easy
Data structures and algorithms made easyData structures and algorithms made easy
Data structures and algorithms made easyCareerMonk Publications
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Ikhwan_Fakrudin
 

Viewers also liked (20)

FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
 
FP305 data structure
FP305     data structure FP305     data structure
FP305 data structure
 
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEMFINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
FINAL PAPER FP501 OPEN SOURCE OPERATING SYSTEM
 
Final paper FN511 Switching & Routing
Final paper FN511 Switching & RoutingFinal paper FN511 Switching & Routing
Final paper FN511 Switching & Routing
 
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
OBJECT ORIENTED ROGRAMMING With Question And Answer  FullOBJECT ORIENTED ROGRAMMING With Question And Answer  Full
OBJECT ORIENTED ROGRAMMING With Question And Answer Full
 
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
FP 303 COMPUTER NETWORK FINAL PAPER JUNE 2012
 
FP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL QFP 303 COMPUTER NETWORK PAPER FINAL Q
FP 303 COMPUTER NETWORK PAPER FINAL Q
 
Data Structures (BE)
Data Structures (BE)Data Structures (BE)
Data Structures (BE)
 
Final exam review answer(networking)
Final exam review answer(networking)Final exam review answer(networking)
Final exam review answer(networking)
 
Exercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With SolutionsExercises TCP/IP Networking With Solutions
Exercises TCP/IP Networking With Solutions
 
Algorithm
AlgorithmAlgorithm
Algorithm
 
Chapter 1 part 1
Chapter 1 part 1Chapter 1 part 1
Chapter 1 part 1
 
C interview question answer 2
C interview question answer 2C interview question answer 2
C interview question answer 2
 
FP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINALFP 303 COMPUTER NETWORK PAPER FINAL
FP 303 COMPUTER NETWORK PAPER FINAL
 
Data structure-questions
Data structure-questionsData structure-questions
Data structure-questions
 
Problem Based Task 1
Problem Based Task 1Problem Based Task 1
Problem Based Task 1
 
Data structures question paper anna university
Data structures question paper anna universityData structures question paper anna university
Data structures question paper anna university
 
Data Structure Notes Part-1
Data Structure Notes Part-1 Data Structure Notes Part-1
Data Structure Notes Part-1
 
Data structures and algorithms made easy
Data structures and algorithms made easyData structures and algorithms made easy
Data structures and algorithms made easy
 
Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2Embedded system (Chapter 2) part 2
Embedded system (Chapter 2) part 2
 

Similar to FP305 data structure PAPER FINAL SEM 3

Redo midterm
Redo midtermRedo midterm
Redo midtermIIUM
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMAmira Dolce Farhana
 
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperMalathi Senthil
 
Data structure manual
Data structure manualData structure manual
Data structure manualsameer farooq
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Poonam Chopra
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1kvs
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917lakshmi r
 
Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdfIT Eagers
 
Ds important questions
Ds important questionsDs important questions
Ds important questionsLavanyaJ28
 
Computer science ms
Computer science msComputer science ms
Computer science msB Bhuvanesh
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Sreeju Sree
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSESujata Regoti
 
Structure in programming in c or c++ or c# or java
Structure in programming  in c or c++ or c# or javaStructure in programming  in c or c++ or c# or java
Structure in programming in c or c++ or c# or javaSamsil Arefin
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professionalIsabella789
 

Similar to FP305 data structure PAPER FINAL SEM 3 (20)

Redo midterm
Redo midtermRedo midterm
Redo midterm
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEM
 
CBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question PaperCBSE Grade12, Computer Science, Sample Question Paper
CBSE Grade12, Computer Science, Sample Question Paper
 
Data structure manual
Data structure manualData structure manual
Data structure manual
 
Computer Science Sample Paper 2015
Computer Science Sample Paper 2015Computer Science Sample Paper 2015
Computer Science Sample Paper 2015
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917
 
Data Structure.pdf
Data Structure.pdfData Structure.pdf
Data Structure.pdf
 
Ds important questions
Ds important questionsDs important questions
Ds important questions
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014Mcs 10 104 compiler design dec 2014
Mcs 10 104 compiler design dec 2014
 
Cs101 endsem 2014
Cs101 endsem 2014Cs101 endsem 2014
Cs101 endsem 2014
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
Structure in programming in c or c++ or c# or java
Structure in programming  in c or c++ or c# or javaStructure in programming  in c or c++ or c# or java
Structure in programming in c or c++ or c# or java
 
Structure in c
Structure in cStructure in c
Structure in c
 
Doc 20180130-wa0005
Doc 20180130-wa0005Doc 20180130-wa0005
Doc 20180130-wa0005
 
Doc 20180130-wa0004-1
Doc 20180130-wa0004-1Doc 20180130-wa0004-1
Doc 20180130-wa0004-1
 
Doc 20180130-wa0004
Doc 20180130-wa0004Doc 20180130-wa0004
Doc 20180130-wa0004
 
Gate-Cs 2010
Gate-Cs 2010Gate-Cs 2010
Gate-Cs 2010
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional
 

Recently uploaded

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfkaushalkr1407
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaasiemaillard
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdfCarlosHernanMontoyab2
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPCeline George
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismDeeptiGupta154
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxJisc
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePedroFerreira53928
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...Nguyen Thanh Tu Collection
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasGeoBlogs
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...Denish Jangid
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxbennyroshan06
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxDenish Jangid
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345beazzy04
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...Nguyen Thanh Tu Collection
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonSteve Thomason
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfTamralipta Mahavidyalaya
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxricssacare
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...Sayali Powar
 

Recently uploaded (20)

The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf678020731-Sumas-y-Restas-Para-Colorear.pdf
678020731-Sumas-y-Restas-Para-Colorear.pdf
 
How to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERPHow to Create Map Views in the Odoo 17 ERP
How to Create Map Views in the Odoo 17 ERP
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
PART A. Introduction to Costumer Service
PART A. Introduction to Costumer ServicePART A. Introduction to Costumer Service
PART A. Introduction to Costumer Service
 
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
50 ĐỀ LUYỆN THI IOE LỚP 9 - NĂM HỌC 2022-2023 (CÓ LINK HÌNH, FILE AUDIO VÀ ĐÁ...
 
The geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideasThe geography of Taylor Swift - some ideas
The geography of Taylor Swift - some ideas
 
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...Basic Civil Engineering Notes of Chapter-6,  Topic- Ecosystem, Biodiversity G...
Basic Civil Engineering Notes of Chapter-6, Topic- Ecosystem, Biodiversity G...
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptxSolid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
Solid waste management & Types of Basic civil Engineering notes by DJ Sir.pptx
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
GIÁO ÁN DẠY THÊM (KẾ HOẠCH BÀI BUỔI 2) - TIẾNG ANH 8 GLOBAL SUCCESS (2 CỘT) N...
 
Synthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptxSynthetic Fiber Construction in lab .pptx
Synthetic Fiber Construction in lab .pptx
 
The Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve ThomasonThe Art Pastor's Guide to Sabbath | Steve Thomason
The Art Pastor's Guide to Sabbath | Steve Thomason
 
Home assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdfHome assignment II on Spectroscopy 2024 Answers.pdf
Home assignment II on Spectroscopy 2024 Answers.pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptxJose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
Jose-Rizal-and-Philippine-Nationalism-National-Symbol-2.pptx
 
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
UNIT – IV_PCI Complaints: Complaints and evaluation of complaints, Handling o...
 

FP305 data structure PAPER FINAL SEM 3

  • 1. CONFIDENTIAL FP305 DATA STRUCTURES Page 2 of 24 SECTION A OBJECTIVE (50 MARKS) INSTRUCTION: This section consists of FORTY (40) objective questions. Answer ALL questions in the answers booklet. 1. A structure can contain ___________ data type. [CLO 1] A. Unique B. C. D. Only Many Only one 2. A data structure can be defined as: [CLO 1] A. a collection of data elements of the same type that are referenced by a common name. B. a collection of related data items stored and referenced under one name. C. a variable containing the address of another variable. D. a collection of nodes, where each node contains a data along with information about the next node. 3. A data structure where elements can be added or removed at either end but not in the middle. [CLO 1] A. Linked lists B. Stacks C. Queues D. Dequeue
  • 2. CONFIDENTIAL FP305 DATA STRUCTURES Page 3 of 24 4. Code given is an initialized data structure. [CLO 1] English.price = 29.90; The operator ‘.’ in the code can be replaced with A. English=> price=29.90 B. EnglishPrice=29.90 C. English-> price=29.90 D. English price=29.90 5. The keyword _____ can be useful to define an alias for a type that is frequently used within a program. It is also useful when the type that you want to use has a name that is too long or confusing. [CLO 1] A. struct B. typedef C. define D. include
  • 3. CONFIDENTIAL FP305 DATA STRUCTURES Page 4 of 24 6. The following codes refer to a data structure definition and declaration. Another way of writing the statement are: [CLO 2] struct book{ int pages; float price; }; struct book Maths, Science; A. struct book { int pages; float price; } Maths, Science; B. struct book Maths, Science { int pages; float price; }; C. struct book Maths, book Science { int pages; float price; }; D. struct book{ int pages; float price; };
  • 4. CONFIDENTIAL FP305 DATA STRUCTURES Page 5 of 24 7. Below is a definition and declaration using array of data structures, struct employees { char id[5], gender, name[25]; int age; } staff[50]; Which one of the following statement is to print or access the name of the seventh staff? [CLO 2] A. cout<<staff[6].name; B. cout<<staff[7].name; C. cout<<staff7.name; D. cout<<staff.name7; 8. Which of the following code is used to initialize all the student genders to blanks and their ages to 0? [CLO 2] for( i=0; i<50; i++) A. { stud[i].gender =[ ]; stud[i].age = 0; } B. { stud[i].gender = ‘ ’; stud[i].age = 0; }
  • 5. CONFIDENTIAL FP305 DATA STRUCTURES Page 6 of 24 C. { stud[i].gender =0; stud[i].age = 0; } D. { stud[i]gender = ‘ ’; stud[i]age = 0; } 9. Which one of the following structure declaration are suitable to the given information below: [CLO 2] “An express bus has details of bus number, fare, driver name, number of passenger and destination”. The structure object name are Transnational, Konsortium , Seri Maju. A. struct Express_bus { int numb_bus; float fare; int driver_name[5]; int numb_passenger; int destination [10]; } Transnational, Konsortium , Seri Maju;
  • 6. CONFIDENTIAL FP305 DATA STRUCTURES Page 7 of 24 B. struct Express_bus { int numb_bus; float fare; char driver_name[5]; int numb_passenger; char destination [10]; } Transnational, Konsortium , Seri Maju; C. struct Express_bus Transnational, Konsortium , Seri Maju { int numb_bus; float fare; char driver_name[5]; int numb_passenger; char destination [10]; }; D. struct Express_bus { int numb_bus; float fare; char driver_name[5]; int numb_passenger; char destination [10]; Transnational, Konsortium , Seri Maju };
  • 7. CONFIDENTIAL FP305 DATA STRUCTURES Page 8 of 24 10. Choose from the following the simplest method to implement a list abstract data type. [CLO 1] A. Linked list B. Structure C. Pointer D. Array 11. “Linked list is a method to overcome the problem of array that cannot allow alteration on it once the program is running.” [CLO 1] Select a correct statement to justify this statement. A. A linked list can be used to manage a dynamically growing and shrinking list of data. B. A linked list is used to chain a collection of data. C. A linked list reallocating the array as needed by adding elements at a time. D. A linked list is slow, in efficient and expensive to use. 12. Identify the code that has similar function to the following code. [CLO 1] typedef int WAH; WAH k; A. typedef k B. char k C. int k D. int *k
  • 8. CONFIDENTIAL FP305 DATA STRUCTURES Page 9 of 24 13. Which of the following will point to the first node of the linked list? [CLO 1] A. Head B. Tail C. New D. Next 14. Match the correct following portion of linked list with the correct function. [CLO 1] Codes Purpose X (*p).data I Access the pointer field Y Pnext Z (*p).next II Access the data field W pdata A. X + I, Y + I, Z + II, W+II B. X + II, Y + I, Z + II, W + I C. X + II, Y + I, Z + I, W + II D. X + II, Y + II, Z + I, W + I 15. Choose an appropriate coding commonly used to delete an item in a record. [CLO 2] A. Prev = curnext B. Node Ptr Result = NULL; C. Node Ptr Result = DELETE; D. Delete cur;
  • 9. CONFIDENTIAL FP305 DATA STRUCTURES Page 10 of 24 16. ________ is a LIFO (Last In First Out) data structure concept where the first data that being inserted will be the last data to delete. [CLO 1] A. Queue B. Searching C. Stack D. Array 17. Figure 1 Which operation would you use to return the Applied Math book from the stack above (Figure 1)? [CLO 1] A. Top B. Pop C. Push D. None of the above
  • 10. CONFIDENTIAL FP305 DATA STRUCTURES Page 11 of 24 18. Based on Figure 2 below, what is the value that will be on the top of the stack after all of the operation being executed? [CLO 2] i. J->data[J->top]=45; ii. J->data[J->top]=30; iii. J->top--; Figure 2 A. 30 B. 45 C. 70 D. 50 19. When new data are to be inserted into a data structure, but there is no available space, this situation is usually called? [CLO 1] A. underflow B. housefull C. overflow D. saturated
  • 11. CONFIDENTIAL FP305 DATA STRUCTURES Page 12 of 24 20. Hafeez and his friends are going to watch ‘The Smurf’ at AEON Bukit Tinggi Klang. He is going to buy six tickets. He arrives early and is the first in a line, other people after him stay behind. Hafeez is currently implementing ________ concept. [CLO 2] A. Queue B. Stack C. Trees D. Linked List 21. Which of the following is the function of delete Queue? [CLO 1] A. uses one queue to delete another B. deletes all instances of the queue C. copies the queue into backup memory D. removes all elements from the queue leaving an empty queue 22. The first element inserted into a queue is the first element to be removed. For this reason, a queue is sometimes called a __________, as opposed to a stack which is __________. [CLO 1] A. LIFO , FIFO B. LIFO , LIFO C. FIFO , FIFO D. FIFO , LIFO
  • 12. CONFIDENTIAL FP305 DATA STRUCTURES Page 13 of 24 23. Which one of the examples below did not refer to the implementation of queue in a real life application? [CLO 1] A. Cars at the traffic light junction B. Clothes folded inside a wardrobe C. Documents waited to be printed at a network sharing printer D. Lines at the library counter 24. The linear array of queue can caused a flowed in memory. Which one of the following types of array is use to solve this problem? [CLO 1] A. Two dimensional B. Circular C. Dynamic D. Double 25. Three basic activities can be applied to array based implementation of queue are: [CLO 1] i. insert items at the rear ii. remove the element at the front iii. return whether the queue is empty or full iv. expand the size according to the total of value to be insert A. i, ii and iii B. i, ii and iv C. ii, iii and iv D. i, iii and iv
  • 13. CONFIDENTIAL FP305 DATA STRUCTURES Page 14 of 24 26. If the letters ‘R’,’S,’T’,’U’,’V’,’W’ are placed in a queue respectively in the given order, and then removed one at a time, in what order will the letters be removed? [CLO 2] A. ‘W’,’V’,’U’,’T’,’S’,’R’ B. ‘U’,’V’,’W’,’R’,’S’,’T’ C. ‘T’,’S’,’R’,’W’,’U’,’V’ D. ‘R’,’S,’T’,’U’,’V’,’W’ 27. In binary search tree, left sub-tree consist of values that are smaller than their parent nodes. [CLO 1] A. TRUE B. FALSE 28. The tree of data structure is getting bigger each time a new item is added without we notice how many nodes are there. Provide the operation that returns the numbers of the nodes available. [CLO 2] A. Return () B. Children (p) C. Element() D. Size()
  • 14. CONFIDENTIAL FP305 DATA STRUCTURES Page 15 of 24 29. Consider the node of a complete binary tree whose value is stored in data[i] for an array implementation. If this node has a right child, where will the right child's value be stored? [CLO 2] A. data[i+1] B. data[i+2] C. data[2*i + 1] D. data[2*i + 2] 30. There are 8, 15, 13 and 14 nodes in 4 different trees. Analyze which one of them can form a full binary tree? [CLO 2] A. 8 B. 15 C. 13 D. 14 31. Choose the correct statements about tree data structure. [CLO 2] A. Given a set S of n real keys chosen at random from a uniform distribution over (a:b) a binary tree can be structured on S in O(n) expected time. B. In the worse case, a red-black tree insertion requires O(1) rotations. C. Given a connected, weighted, undirected graph G in which the edge with minimum weight is unique, that edge belongs to every minimum spanning tree of G. D. Deleting a node from a binary search tree on n nodes take O(lg n) time in the worse case.
  • 15. CONFIDENTIAL FP305 DATA STRUCTURES Page 16 of 24 32. Point out the main disadvantageous of tree performance in searching and sorting. [CLO 2] A. Reordering the tree on removal of an element is a little more complex than in a list or stack. B. Worst case of tree is when all data is in a chain with no sub tree. C. At worst tree will be as effective for searching and sorting as a linked list, at best it will be much faster. D. Tree is seems not practical to be applied in solving computer organization problem. 33. Finding the location of the element with a given value is: [CLO 1] A. Linked List B. Sort C. Stack D. Search 34. ________ sorts a list of values by repeatedly comparing neighboring elements in the list and swapping their position if they are not already in order. [CLO 1] A. Merge B. Insertion C. Bubble D. Quick
  • 16. CONFIDENTIAL FP305 DATA STRUCTURES Page 17 of 24 35. [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] list 16 30 24 7 25 62 45 5 65 50 Figure 3 How many key comparisons would have to be made on the list above Figure 3 to find the number 24? [CLO 3] A. 1 B. 2 C. 3 D. 4 36. Identify sorting type that match to Figure 4 below. [CLO 1] Figure 4 A. Quick B. Merge C. Bubble D. Selection
  • 17. CONFIDENTIAL FP305 DATA STRUCTURES Page 18 of 24 37. Below is the following list to search number 4 in Figure 5. 6, 1, 4, 8, 3, 9 Figure 5 1. Compare the key (Key  4) with the first data in the row 2. If the key is the same with the first data, so mission is accomplish do not need to search more. 3. If key and first data not the same, need to compare the key with the second data until the mission is accomplish. 4. If the key does not match with all of the data in the row, eliminate the process. According to the statement above, what is the type of searching algorithm implement to solve the problem? [CLO 2] A. Binary Search B. Linear Search C. Not Linear Search D. Binary Tree Search
  • 18. CONFIDENTIAL FP305 DATA STRUCTURES Page 19 of 24 38. What is the correct statement that fit Linear Search and Binary Search implementation? [CLO 1] i. Binary Search must be in sorted condition ii. Linear Search must be in sorted condition iii. Linear Search will compare one by one with the key until it finds the same value iv. Binary Search will compare with the middle element of the list A. i and iii B. i, ii and iv C. i, iii and iv D. i, ii, iii and iv 39. Evaluate statement 1 – 3 and choose correct statement for : [CLO 1] 1. First, search item compared with middle element of list 2. If the search item is less than middle element of list, restrict the search to first half of list 3. Otherwise, search second half of list A. All True B. C. D. 1 only 1 and 2 2 and 3 40. In the linked list data structure, the insertion and deletion does not require data movement, only link value is adjusted. [CLO 1] A. True B. False
  • 19. CONFIDENTIAL FP305 DATA STRUCTURES Page 20 of 24 SECTION B STRUCTURE/ ESSAY (50 marks) INSTRUCTION: This section consists of TWO (2) structure questions. Answer ALL questions. QUESTION 1 a) Sketch a linked list diagram referred to segment code as below : [CLO 2] (4 marks) b) Answer the question based on the Diagram 1. Assume a variable list, X and Y as a pointer. Diagram 1 i. Write a relational expression for X to point to the node containing value 23. ii. Write a relational expression for Y to point to the last node in the list [CLO 2] (1.5 marks) [CLO 2] (1.5 marks) newPtr=new mark; newPtr->data=90; newPtr->link=NULL; Head=newPTR; list 18 32 23 32 16 43 32 87 32 25 32 44 32 X Y
  • 20. CONFIDENTIAL FP305 DATA STRUCTURES Page 21 of 24 c) Explain TWO (2) differences between list and linked list. [CLO 1] (4 marks) d) Draw suitable stack diagram for each statement below. a. CreateStack(N); b. Push(70,N); c. Push(40,N); d. Pop(); e. Push(80,N); f. Pop(); g. Push(90,N); h. Push(10,N); [CLO 2] (4 marks) e) State FIVE (5) operation of linear linked list. Explain ONE (1) of them. [CLO 1] (5 marks)
  • 21. CONFIDENTIAL FP305 DATA STRUCTURES Page 22 of 24 f) Write a struct declaration on Student Record based on Table 1. The records are for student from JTMK and JPH. Then assign value for both variable as in Table 1. Member of Struct JTMK JPH (a) student number 17DIP10F1036 01DEP09F1002 (b) student name Quratul’ain Mohd Rayyan (c) semester 03 05 (d) hpnm 3.78 3.50 Table 1 [CLO 3] (5 marks)
  • 22. CONFIDENTIAL FP305 DATA STRUCTURES Page 23 of 24 QUESTION 2 a) Explain the characteristic of Queue implemented using array. b) Describe the function of variable front and variable rear in queue. [CLO 1] (4 marks) [CLO 1] (2 marks) c) Based on the binary search tree in Figure 2a, draw a binary search tree if the operation involves (use the original binary search tree in Figure 2a for each operation). Figure 2a i. Delete I ii. Delete S iii. Insert K [CLO 2] (6 marks) S I U A L F O T Z Y W
  • 23. CONFIDENTIAL FP305 DATA STRUCTURES Page 24 of 24 d) Draw a binary Tree for the expression : i. A * B - (C + D) * (P / Q) ii. ( (B+C) * (D-E) ) / A [CLO 3] (8 marks) e) Use selections to sort the following array: {30, 60, 20, 50, 40, 10}. Show the array content after each step. [CLO 3] (5 marks)