CBSE · Class 12 · Set 1
Computer Science
Practice for the 2027 board exams, session 2026-27. Exams are usually held in February, March and April.
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.
CBSE 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 CBSE 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.
Consider `def calc(x, y=5): return x * y`. What does `calc(3)` combined with `calc(4, 2)` evaluate to?
Model answer · Option D
In `calc(3)`, `y` takes its default value 5 giving 15; in `calc(4, 2)`, explicit argument 2 overrides the default giving 8.
In Python exception handling, when does the code inside an `else` block attached to a `try...except` construct execute?
Model answer · Option C
In `try-except-else-finally`, `else` runs exclusively on exception-free completion of `try`, whereas `finally` runs unconditionally.
While reading a Python text file via handle `f`, which method call returns the current byte offset of the file pointer from the beginning?
Model answer · Option B
`f.tell()` reports the current integer byte position of the stream cursor, whereas `f.seek(offset, whence)` repositions it.
Which standard Python module serialises lists and dictionaries into a binary `.dat` file and reconstructs them via `dump()` and `load()`?
Model answer · Option A
The `pickle` module converts Python object hierarchies into byte streams (`dump`) and deserialises byte streams back into live objects (`load`).
In a Stack implemented using a Python list `stk` where elements are pushed at the end via `stk.append(val)`, what causes an Underflow condition?
Model answer · Option D
Stack underflow occurs whenever a deletion (`pop`) or top inspection is attempted on a completely empty LIFO structure.
Which networking device inspects destination MAC addresses inside data-link frames and forwards packets selectively only to the target port within a LAN?
Model answer · Option C
Unlike a broadcast hub, an Ethernet switch maintains a MAC address table to unicast frames intelligently to the intended device port.
In a relational database table `EXAMS` having 6 columns and 45 rows (excluding the header), what are its degree and cardinality?
Model answer · Option B
Degree denotes the number of attributes (columns = 6) in a relation, while cardinality counts the number of tuples (rows = 45).
Given column `MARKS` containing `85, NULL, 90, 75, NULL` across 5 rows, what do `COUNT(*)` and `COUNT(MARKS)` return in SQL?
Model answer · Option A
`COUNT(*)` tallies every row including NULLs (5), whereas `COUNT(column)` ignores NULL entries and counts only non-null values (3).
Which SQL pattern condition matches every student name whose second character is `"a"` regardless of total length?
Model answer · Option D
In SQL `LIKE`, underscore `_` matches any single character at position 1, `"a"` fixes position 2, and `%` matches zero or more trailing characters.
When executing an `INSERT` or `UPDATE` query on MySQL from Python using `mysql.connector`, why must `conn.commit()` be called?
Model answer · Option C
Without `commit()`, uncommitted transaction changes remain temporary in the session buffer and roll back when the connection closes.
Section B
· Short-answer questionsAttempt all five 2-mark questions.
Why is `newline=""` recommended when opening a CSV file for writing in Python on different operating systems?
Model answer
Passing `newline=""` prevents the `csv.writer` module from inserting extra blank lines between rows caused by double carriage-return translation on Windows.
Write the LIFO sequence of popped elements if `10`, `20`, `30` are pushed onto an empty stack, one `pop()` runs, `40` is pushed, and two `pop()` calls follow.
Model answer
First `pop()` removes `30` (leaving `10, 20`); pushing `40` makes `40` the top, so the next two `pop()` calls output `40` and `20`, producing `30, 40, 20`.
Distinguish between `WHERE` and `HAVING` clauses in an SQL `SELECT` statement.
Model answer
`WHERE` filters individual table rows before grouping and cannot contain aggregate functions, whereas `HAVING` filters grouped summary results produced by `GROUP BY` using aggregates.
Differentiate between a Primary Key and Candidate Keys in a relational schema.
Model answer
Candidate keys are all minimal attributes capable of uniquely identifying tuples; one chosen candidate becomes the non-null Primary Key while remaining candidates are Alternate Keys.
Compare Star topology and Bus topology on fault isolation and cabling cost in a school computer lab.
Model answer
Star topology connects each node to a central switch so a single cable break isolates only one computer despite higher cabling cost, whereas a backbone break in Bus topology halts the entire network.
Official syllabus & blueprint sources
Syllabus scope and question-paper structure were verified against the official portals below, which remain the sole authority.