NIOS · Class 12 · Set 2
Computer Science
Practice for NIOS 2026-27 public examinations, usually held in April-May and October-November, alongside On-Demand windows.
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.
NIOS Class 12 Computer Science, Set 2, 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 NIOS 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.
In Object-Oriented inheritance hierarchies, the existing general class whose members are inherited by a specialised subclass is called the:
Model answer · Option C
A Base class encapsulates shared attributes and methods inherited downward by one or more Derived classes.
Which C++ free-store operator dynamically allocates memory from the heap at runtime and returns a typed pointer to it?
Model answer · Option B
Writing int *p = new int[20]; reserves twenty contiguous integers on the heap during program execution.
To prevent heap memory leaks in long-running C++ programs, memory allocated via new must be explicitly reclaimed using:
Model answer · Option A
Applying delete ptr; invokes any destructor and returns dynamically allocated heap blocks back to the free store.
Which standard C++ header file must be included to perform disk file input and output via ifstream and ofstream classes?
Model answer · Option D
Header <fstream> defines file-stream classes ifstream (reading), ofstream (writing), and fstream (read/write).
Placed immediately before an ordinary variable name (as in &count), which unary C++ operator yields its RAM memory address?
Model answer · Option C
Unary ampersand (&variable) evaluates to the physical/virtual memory address assignable into a compatible pointer.
In relational database model terminology, a single horizontal row representing one complete entity record inside a table is a:
Model answer · Option B
Each horizontal row of a relation is called a tuple, storing one related set of attribute values.
If a relational table STUDENT has 6 columns (RollNo, Name, Stream, DOB, Marks, Grade) and 120 student rows, what is its Degree?
Model answer · Option A
The Degree of a relation equals its total number of attributes (columns), which here is 6.
In the same STUDENT table containing 6 columns and 120 student rows, what is the relation’s Cardinality?
Model answer · Option D
Cardinality counts the current number of tuples (rows) stored inside a relation, changing whenever rows are inserted or deleted.
When using GROUP BY in SQL, which clause filters aggregated group summaries (such as AVG(Marks) > 75)?
Model answer · Option C
Because WHERE cannot evaluate aggregate functions directly, HAVING filters grouped summary rows produced after GROUP BY.
Which HTML element pairs with attribute href="https://nios.ac.in" to create a clickable web hyperlink?
Model answer · Option B
The HTML anchor container <a href="URL">Link Text</a> navigates users to the target web resource on click.
Section B
· Short-answer questionsAttempt all five 2-mark questions.
Highlight two practical software-engineering advantages of using Inheritance in C++ OOP.
Model answer
Inheritance promotes tested code reusability without rewriting base methods and models natural transitive hierarchies ("is-a" relationships) cleanly.
Explain what dereferencing a pointer (*ptr) accomplishes in C++ with a brief code example.
Model answer
Unary * accesses or modifies the value stored at the address held by ptr; if int x = 10, *ptr = &x;, then *ptr = 25 updates x to 25.
Contrast ASCII Text Files with Binary Data Files in C++ file handling on storage representation and portability.
Model answer
Text files store human-readable characters with newline translations, whereas binary files dump exact in-memory byte representations compactly and rapidly without conversion.
Distinguish between SQL WHERE and HAVING clauses regarding when and on what data each filter acts.
Model answer
WHERE filters individual raw table rows prior to grouping, whereas HAVING filters summary groups after GROUP BY and aggregate functions execute.
Compare the effect of SQL DML statement DELETE FROM Emp; with DDL statement DROP TABLE Emp;
Model answer
DELETE FROM Emp; removes row tuples selectively or wholly while keeping the empty table schema intact, whereas DROP TABLE destroys both data and table structure.
Official syllabus & blueprint sources
Syllabus scope and question-paper structure were verified against the official portals below, which remain the sole authority.