Browse papers
LevelNEB Class 12
StreamScience
SubjectComputer Science
Year2081 BS
Exam sessionRegular (annual)
Full marks50
Time allowed120 minutes
Questions16, all with step-by-step solutions
A

Group 'A'

Multiple Choice Questions. Rewrite the correct option of each question in your same answer sheet.

9 questions·1 mark each
1Multiple choice1 mark

Which one of the followings given statement correct ?

  • a

    Select * from enp where eopid = 103;

  • b

    Select from enp where eopid = 103;

  • c

    Select eopid where enp = 103 from emp;

  • d

    Select eopid where eopid = 103 and table = emp;

Correct answer: a

Select * from enp where eopid = 103;

Standard SQL syntax to select all columns is SELECT * FROM enp WHERE eopid = 103;

sqldatabases
2Multiple choice1 mark

Which database system normally offers better performance for geographically dispersed users ?

  • a

    Centralized database system

  • b

    Distributed database system

  • c

    NoSQL database system

  • d

    Relational database system

Correct answer: b

Distributed database system

A distributed database system stores data across multiple geographically dispersed sites, allowing data to be located closer to users and improving performance.

databasesdistributed-systems
3Multiple choice1 mark

Which of the following is an example of a public IPV4 address ?

  • a

    192.168.1.1

  • b

    172.16.10.1

  • c

    10.10.10.10

  • d

    203.0.113.10

Correct answer: d

203.0.113.10

Private IPv4 ranges are 10.0.0.0/8 (10.10.10.10), 172.16.0.0/12 (172.16.10.1) and 192.168.0.0/16 (192.168.1.1). 203.0.113.10 lies outside these private ranges, so it is a public address.

networkingip-addressing
4Multiple choice1 mark

What is the correct syntax for a 'for-loop' in JavaScript ?

  • a

    for (var i = 0; i < 5; i++) {}

  • b

    for (i = 0; i < 5; i++) {}

  • c

    for (var i = 0; i < 5) {}

  • d

    for (var i < 5; i++) {}

Correct answer: a

for (var i = 0; i < 5; i++) {}

A JavaScript for loop requires initialization, condition and increment separated by semicolons: for (var i = 0; i < 5; i++) {}.

javascriptloops
5Multiple choice1 mark

Which PHP function is commonly used to execute SQL queries on a database connection established using mysqli extension ?

  • a

    mysqli_query ( )

  • b

    pdo_query ( )

  • c

    mysql_query ( )

  • d

    pgsql_query ( )

Correct answer: a

mysqli_query ( )

mysqli_query() executes a query on a connection opened with the mysqli extension.

phpmysqlidatabases
6Multiple choice1 mark

What is the correct syntax to declare a structure in C ?

  • a

    struct { }

  • b

    define struct { }

  • c

    struct [ ]

  • d

    struct <name> { }

Correct answer: d

struct <name> { }

A structure in C is declared with the struct keyword followed by a tag name and a brace-enclosed member list: struct <name> { }.

c-programmingstructures
7Multiple choice1 mark

In C, which operator is used to get the address of a variable ?

  • a
  • b

    &

  • c

    ->

  • d

    .

Correct answer: b

&

The address-of operator & returns the memory address of a variable.

c-programmingoperatorspointers
8Multiple choice1 mark

Which OOP feature allows a class to inherit properties and behavior from another class ?

  • a

    Inheritance

  • b

    Encapsulation

  • c

    Polymorphism

  • d

    Abstraction

Correct answer: a

Inheritance

Inheritance lets a class (subclass) acquire the properties and behavior of another class (superclass).

oopinheritance
9Multiple choice1 mark

Which model of SDLC is characterized by a linear progression of phases from requirements gathering to maintenance ?

  • a

    Waterfall model

  • b

    Agile model

  • c

    Spiral model

  • d

    RAD model

Correct answer: a

Waterfall model

The Waterfall model follows a strictly linear, sequential progression of phases from requirements gathering through to maintenance.

sdlcsoftware-engineering
B

Group 'B'

Short answer questions. Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.

5 questions·5 marks each
10Short answer5 marks

Evaluate the advantages of DBMS compared to traditional file-based data storage systems. [5]

OR

How does Second Normal Form (2NF) differ from First Normal Form (1NF), and what are the key benefits of achieving 2NF in database design ? Explain. [2+3]

Advantages of DBMS over file-based systems:

  • Reduced data redundancy and inconsistency: A DBMS stores data in a centralized, normalized way, minimizing duplicate copies that plague separate flat files.
  • Data integrity and constraints: Rules (primary keys, foreign keys, validation) enforce correctness automatically.
  • Data security and access control: Users get role-based privileges; file systems offer only crude file-level protection.
  • Concurrent multi-user access: Locking and transactions (ACID) allow many users to work safely at once.
  • Data independence: Applications are insulated from changes in physical/logical storage.
  • Backup, recovery and query power: Built-in recovery from failures and a powerful query language (SQL) for ad-hoc retrieval, versus custom programs needed for files.

OR — 2NF vs 1NF:

  • A relation is in 1NF if all attribute values are atomic (no repeating groups or multivalued attributes).
  • A relation is in 2NF if it is in 1NF and every non-prime attribute is fully functionally dependent on the whole primary key (i.e., no partial dependency on part of a composite key).
  • Benefits of 2NF: removes partial-dependency redundancy, reduces update/insertion/deletion anomalies, saves storage, and keeps data more consistent.
dbmsdatabases
11Short answer5 marks

Write a JavaScript function that checks if a number is even or odd and print the result. [1+4]

OR

What is purpose of the mysqli_connect ( ) function in PHP ? Describe its usage and parameters. [2+3]

JavaScript even/odd function:

function checkEvenOdd(num) {
  if (num % 2 === 0) {
    console.log(num + " is Even");
  } else {
    console.log(num + " is Odd");
  }
}

checkEvenOdd(7); // Output: 7 is Odd
checkEvenOdd(10); // Output: 10 is Even

The function uses the modulus operator %: if num % 2 equals 0 the number is even, otherwise odd.

OR — mysqli_connect():

mysqli_connect() opens a new connection from a PHP script to a MySQL database server. It returns a connection (link) object on success or false on failure.

Usage:

$conn = mysqli_connect("localhost", "root", "password", "mydb");

Parameters:

  • host – server name or IP (e.g. "localhost").
  • username – MySQL user name.
  • password – password for that user.
  • database – (optional) the default database to use.
  • (optional port and socket).
javascriptphp
12Short answer5 marks

Write short note on class and object in OOPs with a real-word example. [2.5+2.5]

Class: A class is a user-defined blueprint or template that defines the attributes (data members) and behaviors (methods) common to a group of objects. It does not occupy memory by itself.

Object: An object is a concrete instance of a class. It is created from the class blueprint and occupies memory, holding actual values for the attributes.

Real-world example: Consider a class Car with attributes color, brand, speed and methods start(), accelerate(), brake(). A specific car such as a red Toyota running at 60 km/h is an object of the Car class. From the single Car blueprint we can create many objects (a red Toyota, a blue Honda, etc.), each with its own data.

oopclass-object
13Short answer5 marks

How do various requirement gathering techniques help in achieving a careful grasp of user needs and system requirements during SDLC's analysis phase ? [5]

During the analysis phase of the SDLC, requirement gathering (elicitation) techniques are used to capture exactly what users need so the system is built correctly. Key techniques and how they help:

  • Interviews: Direct one-to-one questioning of stakeholders reveals detailed needs, expectations and constraints.
  • Questionnaires/Surveys: Collect requirements quickly from a large number of users and quantify common needs.
  • Observation: Watching users perform their actual work uncovers tacit needs and real workflows they may not articulate.
  • Document analysis: Studying existing forms, reports and procedures shows current data and rules the new system must support.
  • Brainstorming/JAD sessions: Group discussions generate and reconcile requirements among many stakeholders.
  • Prototyping: Early models let users react to a tangible version, clarifying and refining ambiguous requirements.

Together these techniques reduce ambiguity, expose conflicting requirements early, ensure completeness, and give analysts an accurate, validated grasp of user needs—minimizing costly changes later in development.

sdlcrequirements-gathering
14Short answer5 marks

Give five examples of AI applications in the education. [5]

Five examples of AI applications in education:

  1. Intelligent Tutoring Systems – software that adapts lessons and provides personalized one-to-one style guidance to each student.
  2. Automated grading/assessment – AI grades objective tests, quizzes and even essays, giving instant feedback.
  3. Personalized/adaptive learning platforms – systems that adjust content and pace to each learner's strengths and weaknesses.
  4. Chatbots and virtual assistants – answer student queries about courses, admissions and study material 24/7.
  5. Plagiarism detection – AI compares submissions against large databases to detect copied content.

(Other valid examples: AI-based proctoring of online exams, learning analytics to predict at-risk students, language-learning apps with speech recognition.)

artificial-intelligenceeducation
C

Group 'C'

Long answer questions.

2 questions·8 marks each
15Long answer8 marks

How does the star network topology differ from the bus network topology in terms of its architectural layout and data transmission methodology in modern computing environments ? [8]

Star Topology

  • Architectural layout: Every node connects by its own dedicated cable to a central device (hub or switch). The central device is the focal point of all connections.
  • Data transmission: A node sends data to the central hub/switch, which then forwards it to the destination node. A switch forwards only to the intended port, allowing simultaneous communications.
  • Reliability: Failure of one cable/node affects only that node; the rest of the network keeps working. However, failure of the central device disables the whole network.
  • Performance/scaling: Adding a node only needs another link to the hub; performance stays high (especially with a switch). Easy to manage and troubleshoot. Needs more cabling.

Bus Topology

  • Architectural layout: All nodes share a single common backbone cable (the bus), tapping into it along its length, terminated at both ends.
  • Data transmission: A transmitting node broadcasts the signal along the whole bus; every node receives it but only the addressed node accepts it. Only one node can transmit at a time, so a method like CSMA/CD handles collisions.
  • Reliability: A break or fault in the backbone brings down the entire network; faults are hard to isolate.
  • Performance/scaling: Uses the least cable and is cheap for small networks, but performance degrades sharply as more nodes are added because of collisions and shared bandwidth.

Key differences (summary)

AspectStarBus
LayoutCentral hub/switch, point-to-point linksSingle shared backbone cable
TransmissionThrough the central deviceBroadcast on shared medium
Single point of failureThe central hub/switchThe backbone cable
Node failure impactOnly that nodeCable break disables all
Cabling costHigherLower
Scalability/performanceGood (esp. with switch)Poor as nodes grow

In modern computing environments the star topology dominates (Ethernet with switches, Wi-Fi access points) because of its reliability, easy fault isolation and support for simultaneous high-speed transmission, whereas the bus topology is largely obsolete.

networkingnetwork-topology
16Long answer8 marks

Write a C program that uses structures to represent details of five books (title, author, publisher and price) and prints them out. [8]

OR

Discuss the concept of binary file handling in C programming and explain how putw ( ) and getw ( ) functions facilitate binary input/output operations. Give examples. [8]

C program using a structure for five books:

#include <stdio.h>

struct Book {
    char title[50];
    char author[50];
    char publisher[50];
    float price;
};

int main() {
    struct Book books[5];
    int i;

    // Input details of five books
    for (i = 0; i < 5; i++) {
        printf("Enter title, author, publisher and price of book %d:\n", i + 1);
        scanf("%s %s %s %f", books[i].title, books[i].author,
              books[i].publisher, &books[i].price);
    }

    // Print details of five books
    printf("\nDetails of Books:\n");
    for (i = 0; i < 5; i++) {
        printf("Book %d: %s, %s, %s, Rs. %.2f\n", i + 1,
               books[i].title, books[i].author,
               books[i].publisher, books[i].price);
    }

    return 0;
}

Here struct Book groups four related fields; an array of five Book structures stores all records, which are then printed in a loop.

OR — Binary file handling in C:

A binary file stores data in the same internal (binary) representation used in memory, rather than as human-readable text. Binary files are opened in binary mode (e.g. "rb", "wb", "ab") and are faster and more compact for numeric data, with no formatting conversion.

  • putw(int w, FILE *fp) writes an integer w to the file fp in binary form. It returns the value written (or EOF on error).
  • getw(FILE *fp) reads the next integer from the binary file fp. It returns the integer read, or EOF at end of file/on error.

Example:

#include <stdio.h>

int main() {
    FILE *fp;
    int n, i;

    // Write integers to a binary file
    fp = fopen("numbers.dat", "wb");
    for (i = 1; i <= 5; i++)
        putw(i * 10, fp);   // writes 10,20,30,40,50
    fclose(fp);

    // Read them back
    fp = fopen("numbers.dat", "rb");
    while ((n = getw(fp)) != EOF)
        printf("%d ", n);   // prints 10 20 30 40 50
    fclose(fp);

    return 0;
}

Thus putw() and getw() provide simple integer-level binary I/O, complementing fread()/fwrite() for block I/O.

c-programmingstructuresfile-handling

Frequently asked questions

Where can I find the NEB Class 12 Computer Science question paper 2081?
The full NEB Class 12 Computer Science 2081 (Regular (annual)) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Computer Science 2081 paper come with solutions?
Yes. Every question on this Computer Science past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the NEB Class 12 Computer Science 2081 paper?
The NEB Class 12 Computer Science 2081 paper carries 50 full marks and is meant to be completed in 120 minutes, across 16 questions.
Is practising this Computer Science past paper free?
Yes — reading and attempting this Computer Science past paper on Kekkei is completely free.