Skip to main content
BharatBoard

Last verified: 28 November 2026 across official school board and government recruitment portals.

BharatBoard is a private, independent guide. It does not represent any government entity and does not provide any government service. Information is summarised from official board and government websites.

Tap any MCQ option to check
Original practice paper. Not an official board paper.Session 2026–27

CBSE · Class 12 · Set 1

Computer Science

Code 08315 questions20 marks1 hour

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

01:00:00

General instructions & how to use this paper

  1. 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.
  2. Timing is typical months only — always verify the exact dates on the official board website, which change every session.

Section A

· Multiple-choice questions

Attempt all ten 1-mark questions.

10 marks
Q1

Consider `def calc(x, y=5): return x * y`. What does `calc(3)` combined with `calc(4, 2)` evaluate to?

1 mark

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.

Q2

In Python exception handling, when does the code inside an `else` block attached to a `try...except` construct execute?

1 mark

Model answer · Option C

In `try-except-else-finally`, `else` runs exclusively on exception-free completion of `try`, whereas `finally` runs unconditionally.

Q3

While reading a Python text file via handle `f`, which method call returns the current byte offset of the file pointer from the beginning?

1 mark

Model answer · Option B

`f.tell()` reports the current integer byte position of the stream cursor, whereas `f.seek(offset, whence)` repositions it.

Q4

Which standard Python module serialises lists and dictionaries into a binary `.dat` file and reconstructs them via `dump()` and `load()`?

1 mark

Model answer · Option A

The `pickle` module converts Python object hierarchies into byte streams (`dump`) and deserialises byte streams back into live objects (`load`).

Q5

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?

1 mark

Model answer · Option D

Stack underflow occurs whenever a deletion (`pop`) or top inspection is attempted on a completely empty LIFO structure.

Q6

Which networking device inspects destination MAC addresses inside data-link frames and forwards packets selectively only to the target port within a LAN?

1 mark

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.

Q7

In a relational database table `EXAMS` having 6 columns and 45 rows (excluding the header), what are its degree and cardinality?

1 mark

Model answer · Option B

Degree denotes the number of attributes (columns = 6) in a relation, while cardinality counts the number of tuples (rows = 45).

Q8

Given column `MARKS` containing `85, NULL, 90, 75, NULL` across 5 rows, what do `COUNT(*)` and `COUNT(MARKS)` return in SQL?

1 mark

Model answer · Option A

`COUNT(*)` tallies every row including NULLs (5), whereas `COUNT(column)` ignores NULL entries and counts only non-null values (3).

Q9

Which SQL pattern condition matches every student name whose second character is `"a"` regardless of total length?

1 mark

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.

Q10

When executing an `INSERT` or `UPDATE` query on MySQL from Python using `mysql.connector`, why must `conn.commit()` be called?

1 mark

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 questions

Attempt all five 2-mark questions.

10 marks
Q11

Why is `newline=""` recommended when opening a CSV file for writing in Python on different operating systems?

2 marks

Model answer

Passing `newline=""` prevents the `csv.writer` module from inserting extra blank lines between rows caused by double carriage-return translation on Windows.

Q12

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.

2 marks

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`.

Q13

Distinguish between `WHERE` and `HAVING` clauses in an SQL `SELECT` statement.

2 marks

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.

Q14

Differentiate between a Primary Key and Candidate Keys in a relational schema.

2 marks

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.

Q15

Compare Star topology and Bus topology on fault isolation and cabling cost in a school computer lab.

2 marks

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.