Skip to content
KALANBLON
Show contents

Chapter 3 of 7 · 10 min

Quiz: data structures

Linked lists and hash tables: let's check you master dynamic structures and their memory. You need 70 % correct answers, and every answer is explained.

Quiz

5 questions · pass mark: 70%

  1. 1.Why does push_front receive a Node ** rather than a Node *?

    One answer

  2. 2.What does it cost to access the n-th item of a linked list?

    One answer

  3. 3.Which statements about a hash table with chaining are true? (several answers)

    Several answers possible

  4. 4.Complete the line that keeps the next node's address before freeing the current node.

    Complete the code

    while (head != NULL) {
        Node *next = head->____;
        free(head);
        head = next;
    }
  5. 5.A table stores the pointer to the line read by fgets directly, without copying. What happens?

    One answer

Your progress is saved on this device. Create a free account to keep your progress on all your devices.