DataStruct Final 2024 1
DataStruct Final 2024 1
Q2. What do the following functions do? Describe with an example for each one (8 marks)
A. B.
void fun1(struct LL* head){ void fun2(struct LL* head){
if (head == NULL) if (head == NULL)
return; return;
cout << head->data << " ";
fun1(head->next); if (head->next != NULL)
cout << head->data << " ";} fun2(head->next->next);
cout << head->data << " ";}
Q3. What are the functions of studying data structures? (in brief and specific points, no examples)
(4 marks)
Page 4|4