Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

TOPIC 1 & 2

DFC3033
Data Structure

DATA STRUCTURE & LIST AND LINKED LIST


NAMA / STUDENT’S NAME
NO PEND / STUDENT’S ID
KELAS / CLASS 30
INSTRUCTION : ANSWER ALL QUESTION (CLO2)

QUESTION 1

a) Explain what data structure is. (2m)

b) Write the structure declaration to hold the following data about a saving account :
(4m)
i. Account Number (15 element character string)
ii. Account Balance (double)
iii. Interest Rate (double)
iv. Average Monthly Balance (double)

c) State the differences between linear and non-linear types of data structures.
(4m)

QUESTION 2

a) Explain what is the meaning of list and linked list. (6m)

b) State four (4) differences between link and linked list. (4m)

c) From the digram below, draw the new diagram if : (6m)

i. New item which is ‘18’ is added between item two and item three.
ii. The old item which is ‘7’ is deleted from the list.
iii. New item which is ‘11’ is added in front of the first item.
(For every new figure, please use the old diagram in this question)

d) State the differences between node and node pointer in the linked list.
(4m)

You might also like