IB · Class 12 · Set 1
Computer Science
Practice for IB 2026-27 assessments. Examination sessions run in May and November according to school registration.
Independent practice paper — verify on official board sources
Disclaimer: BharatBoard is an independent student and parent guide — not affiliated with, associated with, or endorsed by any Central Board, State Board, school, educational institution, recruitment commission, or government body, and does not represent any government entity. We recommend that you contact and verify all exam results, date sheets, syllabi, school admission dates, eligibility criteria, fee schedules, scholarships, and government job notifications directly with the respective school, institution, Central Board, State Board, or recruitment body via their official websites and notifications. These questions are original practice items for revision. Follow the official syllabus, the prescribed textbooks, and your school or institution. Model answers are a study aid. They are not an official marking scheme.
IB Class 12 Computer Science, Set 1, is an original BharatBoard revision set of 20 marks. It is shorter than a full board paper. The official syllabus and sample papers on the IB website remain the authority.
Timed Exam Mode
Official 60-minute writing countdown
General instructions & how to use this paper
- This revision set has 15 questions and 20 marks. Ten questions are one mark. Five questions are two marks. Attempt every question. A calculator is not needed.
- Timing is typical months only — always verify the exact dates on the official board website, which change every session.
Section A
· Multiple-choice questionsAttempt all ten 1-mark questions.
Which abstract data structure enforces Last-In, First-Out (LIFO) ordering and directly manages return addresses and local frames during nested function calls?
Model answer · Option D
Each subroutine invocation pushes an activation frame onto the call stack, and returning pops the most recently added frame first.
Performing an in-order traversal (Left → Root → Right) on any valid Binary Search Tree (BST) containing distinct numeric keys visits nodes in what sequence?
Model answer · Option C
Because every left-subtree key is smaller than its parent and every right-subtree key is larger, Left-Root-Right visits keys monotonically upward.
Why is a circular queue preferred over a naive linear array queue for buffering incoming printer jobs inside fixed memory?
Model answer · Option B
Wrapping rear and front indices via (index + 1) mod size reclaims freed front cells in O(1) time without costly O(n) array shifts.
What runtime error occurs if a recursive algorithm omits a valid base case or fails to progress toward that base case?
Model answer · Option A
Unbounded recursive calls continually push return addresses and parameters onto the finite call stack until memory overflows.
Compared with a contiguous static 1D array, what is the primary structural trade-off of a dynamic singly linked list?
Model answer · Option D
Linked nodes allocate heap memory dynamically via next-pointers, trading away direct index arithmetic ARR[k] for flexible resizing and splice insertions.
In an automated drip-irrigation control system, why is a closed-loop feedback design superior to an open-loop daily timer?
Model answer · Option C
Feedback compares live sensor data (via ADC) against preset targets, preventing overwatering during rain and underwatering during heatwaves.
In a square 2D array MAT[0..N−1][0..N−1], which index relationship identifies every cell lying along the main top-left to bottom-right diagonal?
Model answer · Option B
Main-diagonal entries sit at (0,0), (1,1), ..., (N−1, N−1), accessed cleanly in a single loop over MAT[I][I].
Which combination of conditions can freeze two concurrent operating-system processes permanently in resource deadlock?
Model answer · Option A
Mutual exclusion, hold-and-wait, no preemption, and circular wait lock both processes indefinitely unless the OS prevents or breaks the cycle.
Why does an automotive anti-lock braking system (ABS) rely on a dedicated real-time embedded OS rather than a general-purpose desktop OS?
Model answer · Option D
Safety-critical control loops demand stripped-down firmware with bounded worst-case interrupt latency so wheel-lock modulation never misses a deadline.
What role does an Analogue-to-Digital Converter (ADC) perform inside a microprocessor-controlled hospital incubator?
Model answer · Option C
Physical temperature sensors generate continuous analogue voltages, whereas digital microprocessors compare and process binary integers.
Section B
· Short-answer questionsAttempt all five 2-mark questions.
A Binary Search Tree inserts keys in the exact order: 50, 30, 70, 20, 40. Write out its pre-order and post-order traversal sequences.
Model answer
Root is 50 with left subtree (30 with children 20, 40) and right child 70. Pre-order (Root-Left-Right): 50, 30, 20, 40, 70. Post-order (Left-Right-Root): 20, 40, 30, 70, 50.
Outline the pointer reassignments required to insert NEW_NODE immediately after PREV_NODE inside a non-empty singly linked list.
Model answer
First set NEW_NODE.next = PREV_NODE.next so the tail of the list is not orphaned; second set PREV_NODE.next = NEW_NODE to link the new node into sequence.
Trace stack contents step by step for: S.push(4); S.push(9); X = S.pop(); S.push(X + 3); S.push(2). Identify the top element and final size.
Model answer
After push(4), push(9): [4, 9]. X = pop() removes 9, leaving [4]. push(9 + 3) pushes 12: [4, 12]. push(2) yields [4, 12, 2], with top element 2 and size 3.
Explain one computational advantage and one security challenge of volunteer distributed grid computing across internet-connected PCs.
Model answer
Aggregating idle CPU/GPU cycles across thousands of machines tackles massive scientific simulations without supercomputer capital cost, but untrusted nodes require encrypted work-units and redundant result verification against tampering.
Compare doubly linked lists with singly linked lists in terms of traversal flexibility and per-node memory overhead.
Model answer
Doubly linked nodes store both next and previous pointers, enabling bidirectional traversal and O(1) known-node deletion, while costing extra pointer RAM and two link updates per change.
Official syllabus & blueprint sources
Syllabus scope and question-paper structure were verified against the official portals below, which remain the sole authority.