S6 ICT Practice Paper (Set 2): Data Structures and Program Tracing, IPv4 Subnetting and Transmission Time, Relational Database and SQL, Multimedia File Size and Compression, RSA and Digital Signatures, System Development and Critical Path (100 marks)
- 2026-11-22
S6 ICT practice paper: 24 parts, 100 marks, 75 minutes on stacks and queues, IPv4 subnetting, SQL, multimedia file size, RSA and digital signatures.
Question 1 — Data Structures and Program Tracing (16 marks)
A program implements a stack with a Python list (only append and pop) and a queue with collections.deque (append to enqueue, popleft to dequeue). The stack starts empty; the queue starts with 5 elements A, B, C, D, E with A at the front.
| # | Question | Answer and marking notes |
|---|---|---|
| 1 | The operations push(3), push(7), push(5), pop(), push(1), pop() are carried out in order. Write the final stack contents from top to bottom. | push 3 -> [3]; push 7 -> [3, 7]; push 5 -> [3, 7, 5]; pop() removes 5; push 1 -> [3, 7, 1]; pop() removes 1. Final stack top to bottom: 7, 3. |
| 2 | Evaluate the postfix expression 6 2 3 * – 4 2 / + and show the intermediate result after each operator. | Read 6, 2, 3; * gives 2 x 3 = 6, stack [6, 6]; – gives 6 – 6 = 0; read 4, 2; / gives 4 / 2 = 2; + gives 0 + 2 = 2. Answer 2. |
| 3 | The queue is dequeued twice, then F, G and H are enqueued. State the final queue length, the front element and the rear element. | Two dequeues remove A and B, leaving [C, D, E]; enqueuing F, G, H gives [C, D, E, F, G, H], so the length is 6, the front is C and the rear is H. |
| 4 | How many pointers must be changed to insert a new node at the head of a singly linked list? How many comparisons at most does binary search need on a sorted array of 1,024 elements? Compare the time complexity of the two operations. | Insertion at the head needs 2 pointer changes (new node next points to the old head, head points to the new node), O(1). Binary search halves the range each time, so at most log2 1024 = 10 comparisons, i.e. O(log n). |
Question 2 — IPv4 Subnetting and Transmission Time (18 marks)
A school is allocated the network 192.168.10.0/24 and the administrator splits it into 4 equal subnets; one subnet is 192.168.10.64/26. Separately, a 12 MB file is sent over a 100 Mbps link with 8% protocol overhead (1 MB = 10^6 bytes).
| # | Question | Answer and marking notes |
|---|---|---|
| 5 | Write the dotted-decimal subnet mask for /26 and calculate the number of usable hosts per subnet. | Host bits = 32 – 26 = 6; mask = 255.255.255.192 (11111111.11111111.11111111.11000000); usable hosts = 2^6 – 2 = 62. |
| 6 | How many bits must be borrowed to split the /24 into 4 subnets? For 192.168.10.64/26 state the network address, the broadcast address and the usable host range. | Borrow 2 bits (2^2 = 4 subnets). Network address 192.168.10.64; block size 64, so the broadcast address is 192.168.10.127; usable hosts run from 192.168.10.65 to 192.168.10.126. |
| 7 | Calculate the time in seconds, to 4 decimal places, needed to transfer the 12 MB file over that link. | File = 12 x 8 x 10^6 = 96,000,000 bits; effective bandwidth = 100 x 0.92 = 92 Mbps; time = 96,000,000 / 92,000,000 = 1.0435 s. |
| 8 | Should live video streaming use TCP or UDP? Give one reason and one corresponding risk. | UDP should be used: it does not wait for retransmission, so latency is lower, which suits live streaming. The risk is that lost packets are not resent, so the picture may show artefacts or brief freezes. |
Question 3 — Relational Database and SQL (16 marks)
A tutorial school database has three relations: Student(SID, SName, Class) with 6 students, Course(CID, CTitle, Teacher) with 3 courses, and Enrol(SID, CID, Score) with 9 enrolment records. Student S06 has no enrolment. The classes are 4A (three students), 4B (two students) and 5A (one student).
| # | Question | Answer and marking notes |
|---|---|---|
| 9 | State the primary key of each of the three relations and the foreign keys in Enrol. | Student: SID; Course: CID; Enrol: the composite key (SID, CID); the foreign keys in Enrol are SID referencing Student and CID referencing Course. |
| 10 | Write an SQL statement that lists the number of students in each class, sorted by class, and give the result of the query. | SELECT Class, COUNT(*) FROM Student GROUP BY Class ORDER BY Class; the result has three rows: 4A 3, 4B 2, 5A 1. |
| 11 | If Student and Enrol are merged into EnrolAll(SID, SName, CID, CTitle, Score), explain why it violates second normal form (2NF) and give the decomposed table structure. | The key is (SID, CID) but SName depends only on SID and CTitle only on CID; these partial dependencies violate 2NF. Decompose into Student(SID, SName), Course(CID, CTitle) and Enrol(SID, CID, Score). |
| 12 | How many rows does an INNER JOIN of Student and Enrol return? How many rows does a LEFT JOIN with Student as the left table return? Explain the difference. | The INNER JOIN matches only enrolments, so S06 is dropped and 9 rows are returned. The LEFT JOIN keeps all 6 students; S06 shows NULL for CID and Score, giving 10 rows. |
Question 4 — Multimedia File Size and Compression (16 marks)
A bitmap image of 1024 x 768 pixels with a colour depth of 24 bits; an uncompressed audio clip sampled at 44.1 kHz, 16-bit, stereo, 60 seconds long (1 MiB = 1,048,576 bytes).
| # | Question | Answer and marking notes |
|---|---|---|
| 13 | Calculate the uncompressed size of the image in bytes and in MiB. | Each pixel takes 24 / 8 = 3 bytes; total 1024 x 768 x 3 = 2,359,296 bytes; 2,359,296 / 1,048,576 = 2.25 MiB. |
| 14 | If lossless compression reduces the file to one eighth, give the compressed size in bytes and KiB, and explain why a bitmap image rarely reaches that ratio. | 2,359,296 / 8 = 294,912 bytes = 288 KiB. Each pixel is stored independently; when neighbouring pixels differ, there is little repeated pattern, so lossless compression typically achieves only two to three times. |
| 15 | Calculate the uncompressed size of the audio clip in bytes and in MiB to 3 decimal places. | Bytes per second = 44,100 x 2 x 2 = 176,400; for 60 s = 10,584,000 bytes; 10,584,000 / 1,048,576 = 10.094 MiB. |
| 16 | Compare lossy and lossless compression and state which one should be used for digital camera photos and for medical scan images. | Lossy compression discards data permanently for a much higher ratio and cannot restore the original; lossless compression restores the original exactly but compresses less. Camera photos can use lossy compression (e.g. JPEG); medical scans must be lossless so diagnosis is not affected. |
Question 5 — RSA and Digital Signatures (18 marks)
A system uses RSA with the primes p = 5 and q = 11 and public exponent e = 3. The plaintext to be sent is m = 7. The system also protects important files with digital signatures.
| # | Question | Answer and marking notes |
|---|---|---|
| 17 | Calculate the modulus n, Euler totient φ(n) and the private exponent d. | n = p x q = 5 x 11 = 55; φ(n) = (p – 1)(q – 1) = 4 x 10 = 40; d satisfies e x d = 1 mod 40; 3 x 27 = 81 = 2 x 40 + 1, so d = 27. |
| 18 | Encrypt the plaintext with the public key and then decrypt with the private key to verify the result. | Ciphertext c = 7^3 mod 55 = 343 mod 55 = 13; decrypting 13^27 mod 55 gives 7, so the plaintext is restored correctly. |
| 19 | Why does TLS use both symmetric and asymmetric encryption? Explain the role of each in a connection. | Asymmetric encryption solves key distribution: the client encrypts a random session key with the server public key. Symmetric encryption is fast, so bulk data then uses that session key, giving both security and performance. |
| 20 | Describe how a digital signature is created and verified, and state the role of the hash function. | The sender hashes the message and signs the hash with the sender private key; the receiver verifies with the sender public key and recomputes the hash to compare. The hash maps any message to a fixed-length digest, so tampering is detected and signing is faster. |
Question 6 — System Development and Critical Path (16 marks)
The activities of an enrolment system project are: A (3 days) and B (4 days) may start at once; C (5 days) waits for A; D (2 days) waits for B; E (4 days) waits for both C and D; F (3 days) waits for E. The project is run by a team and needs user acceptance.
| # | Question | Answer and marking notes |
|---|---|---|
| 21 | List the five main phases of the system development life cycle (SDLC) in the correct order and state which phase is usually the most expensive. | Requirements analysis -> system design -> implementation (coding) -> testing -> deployment and maintenance; maintenance is usually the most expensive because it spans the longest part of the system life. |
| 22 | Calculate the critical path, the project duration and the slack of activity D. | A-C-E-F = 3 + 5 + 4 + 3 = 15 days; B-D-E-F = 4 + 2 + 4 + 3 = 13 days. The critical path is A-C-E-F with a duration of 15 days. D starts at day 4 and E at day 8, so the slack of D is 8 – (4 + 2) = 2 days. |
| 23 | If the login function passes module-level tests but fails once connected to the database, which type of testing is needed? State who is responsible for unit testing and for user acceptance testing. | Integration testing is needed to check interfaces and data passing between modules. Unit testing is done by programmers; user acceptance testing is done by the users or client to confirm the system meets business needs. |
| 24 | Name two main actors in a use case diagram for online enrolment and explain why a data flow diagram (DFD) is drawn during design. | Main actors: a student (applicant) and an administrator (approves courses and places). A DFD shows where data comes from, how it is processed, where it is stored and what it outputs, helping reveal missing steps and duplicated data before coding. |
Find a tutor — freeTutor Registration →
A TutorZone practice paper; original questions and passages, not publisher material.



