NEB Class 12 Science Computer Science Question Paper 2082 (Set B) Nepal
This is the official NEB Class 12 (Science stream) Computer Science question paper for 2082 Set B, as set in the supplementary supplementary examination. It carries 50 full marks and a time allowance of 120 minutes, across 16 questions. On Kekkei you can attempt this Computer Science past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your NEB Class 12 Computer Science exam or solving previous years' question papers, this 2082 paper is a great way to practise under real exam conditions.
Group 'A' (Multiple choice questions)
Rewrite its (MCQ) correct option (answer) in the same answer sheet. (Provided after 30 minutes.)
Which SQL query will display all records from table "ADDRESS" in descending order according to the lastname?
Why is normalization important in database design?
It reduces data redundancy, eliminates anomalies, and improve data integrity.
Normalization reduces data redundancy, eliminates anomalies, and improves data integrity.
What type of transmission medium includes physical cables such as twisted pair, coaxial, and fiber optic?
Guided
Physical cables form a guided transmission medium.
Choose the correct datatype of the following variable in JavaScript. Let a = 4.5
Number
In JavaScript, all numeric values (including 4.5) are of type Number.
What type of language is PHP?
Server-side
PHP is a server-side scripting language.
Which of the following is a correct function declaration in C?
void function (int x, int y);
void function (int x, int y); is a valid C function declaration (prototype) with typed parameters.
What is the primary benefit of using inheritance in oop?
Code reusability
The primary benefit of inheritance is code reusability.
The method of testing smallest functional units of code is called ...........
Unit Testing
Testing the smallest functional units of code is called unit testing.
What is an example of a SaaS application in cloud?
Google Docs.
Google Docs is a SaaS (Software as a Service) application.
Group 'B' (Short answer questions)
Attempt all the questions.
What is Normalization? Explain 2 NF.
OR
Write two DDL Commands and three DML Commands in SQL with Syntax.
Normalization
Normalization is the process of organizing the data in a relational database to reduce data redundancy and eliminate undesirable characteristics like insertion, update and deletion anomalies. It is carried out by decomposing larger tables into smaller, well-structured tables and defining relationships between them, so that the data is stored logically and consistently.
Second Normal Form (2NF)
A relation is said to be in 2NF if and only if:
- It is already in First Normal Form (1NF) (i.e. all attribute values are atomic and there are no repeating groups), and
- Every non-key attribute is fully functionally dependent on the whole primary key (i.e. there is no partial dependency — no non-key attribute depends on only a part of a composite primary key).
Example: Consider the table SCORE(StudentID, CourseID, StudentName, Marks) with composite key (StudentID, CourseID).
StudentNamedepends only onStudentID(part of the key) → this is a partial dependency, so the table is in 1NF but not in 2NF.
To convert it to 2NF, decompose it:
| Table | Attributes |
|---|---|
| STUDENT | StudentID (PK), StudentName |
| SCORE | StudentID, CourseID (PK), Marks |
Now every non-key attribute depends on the full primary key, so both tables are in 2NF, removing partial dependency and reducing redundancy.
OR — DDL and DML Commands in SQL
DDL (Data Definition Language) commands define the database structure (schema). Two examples:
-- 1. CREATE: creates a new table
CREATE TABLE Student (
RollNo INT PRIMARY KEY,
Name VARCHAR(50),
Age INT
);
-- 2. ALTER: modifies an existing table structure
ALTER TABLE Student ADD Address VARCHAR(100);
DML (Data Manipulation Language) commands manipulate the data within tables. Three examples:
-- 1. INSERT: adds new records
INSERT INTO Student (RollNo, Name, Age) VALUES (1, 'Ram', 18);
-- 2. UPDATE: modifies existing records
UPDATE Student SET Age = 19 WHERE RollNo = 1;
-- 3. DELETE: removes records
DELETE FROM Student WHERE RollNo = 1;
Write a program in JavaScript to input Age of a person and display whether the person is eligible for voting or not. (If Age is greater than or equal to 18 years, eligible for voting otherwise not eligible)
OR
Write a PHP function which is commonly used to establish a connection to a MySQL database with an example.
JavaScript program — Voting eligibility
<!DOCTYPE html>
<html>
<body>
<script>
// Input the age of the person
var age = parseInt(prompt("Enter the age of the person:"));
if (age >= 18) {
document.write("The person is eligible for voting.");
} else {
document.write("The person is NOT eligible for voting.");
}
</script>
</body>
</html>
Working: The prompt() reads the age and parseInt() converts the input string to an integer. If age >= 18 the program prints that the person is eligible for voting; otherwise it prints not eligible.
OR — PHP function to connect to a MySQL database
The function commonly used to establish a connection to a MySQL database is mysqli_connect() (or the object-oriented new mysqli()).
Syntax:
mysqli_connect(host, username, password, database_name);
Example:
<?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "school";
// Establish the connection
$conn = mysqli_connect($servername, $username, $password, $dbname);
// Check the connection
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";
?>
Here mysqli_connect() returns a connection object on success, which is then used for running queries; if it fails, mysqli_connect_error() reports the reason.
Write short notes on "class" and "Polymorphism" in Object Oriented programming.
Class
A class is a user-defined data type that acts as a blueprint or template for creating objects. It binds together data members (attributes) and member functions (methods) that operate on that data into a single unit (encapsulation). A class itself occupies no memory; memory is allocated only when objects (instances) of the class are created.
Example (C++):
class Student {
private:
int rollNo;
char name[50];
public:
void getData();
void showData();
};
Here Student is a class; s1, s2 would be its objects.
Polymorphism
Polymorphism (from Greek, meaning "many forms") is the OOP feature that allows the same function name or operator to behave differently depending on the context (the type of object or the arguments). It increases flexibility and reusability of code. There are two types:
- Compile-time (static) polymorphism — achieved through function overloading and operator overloading; the function to call is decided at compile time.
- Run-time (dynamic) polymorphism — achieved through function overriding using virtual functions; the function to call is decided at run time.
Example: A function area() defined for both a Circle and a Rectangle class computes area differently for each object, yet is called by the same name.
Explain Agile method of software development.
Agile Method of Software Development
Agile is an iterative and incremental approach to software development in which the project is divided into small, manageable cycles called iterations or sprints (typically 1–4 weeks). Instead of delivering the entire product at the end (as in the Waterfall model), Agile delivers small, working pieces of software at the end of each iteration, with continuous feedback from the customer.
Key features:
- Customer collaboration — the customer is involved throughout the development and gives regular feedback.
- Iterative & incremental delivery — software is built in small increments, each tested and potentially shippable.
- Adaptive to change — requirements can change even late in development; Agile welcomes changing requirements.
- Continuous testing and integration — testing is done in every iteration, improving quality.
- Self-organizing teams with frequent communication (e.g. daily stand-up meetings).
Core values (Agile Manifesto): Individuals and interactions over processes and tools; working software over comprehensive documentation; customer collaboration over contract negotiation; responding to change over following a plan.
Popular Agile frameworks include Scrum, Extreme Programming (XP), and Kanban.
Advantages: faster delivery, flexibility to changing requirements, higher customer satisfaction, and early detection of defects. Limitation: less suitable for projects with fixed, unchanging requirements or where extensive documentation is mandatory.
Explain the three "Vs" of big data.
The three Vs of big data are Volume, Velocity and Variety.
Group 'C' (Long answer questions)
Attempt all the questions.
a) Write four difference between Client Server and Peer to Peer network.
b) Explain simplex and full-duplex with diagram.
a) Differences between Client–Server and Peer-to-Peer Network
| S.N. | Client–Server Network | Peer-to-Peer Network |
|---|---|---|
| 1 | There is a dedicated central server that provides services and resources to clients. | There is no dedicated server; every computer (peer) acts as both client and server. |
| 2 | Data and resources are stored centrally on the server. | Data and resources are stored on individual peers (distributed). |
| 3 | More secure, as security is managed centrally by the server. | Less secure, as each peer manages its own security. |
| 4 | More expensive and complex; suitable for large networks. | Cheaper and easy to set up; suitable for small networks. |
(Additional valid point: in client-server, if the server fails the whole network is affected, whereas in peer-to-peer the failure of one peer does not stop others.)
b) Simplex and Full-Duplex Transmission Modes
Simplex mode: Data flows in only one direction — one device is always the sender and the other is always the receiver. Communication is unidirectional. Example: keyboard to computer, computer to monitor, radio/TV broadcasting.
Sender ───────────► Receiver
(one way only)
Full-Duplex mode: Data flows in both directions simultaneously — both devices can send and receive at the same time. This gives the fastest, two-way communication. Example: telephone conversation.
Device A ◄──────────── Device B
Device A ────────────► Device B
(both directions at the same time)
(Note: In half-duplex, by contrast, both directions are possible but only one at a time, e.g. a walkie-talkie.)
Write a C program to enter information of 10 clients, including accountID, accountname, address, and balance, and display the information using a structure.
OR
Describe file handling modes on C. Write a C program to create and write data into a file.
C Program — Information of 10 clients using a structure
#include <stdio.h>
struct Client {
int accountID;
char accountname[50];
char address[50];
float balance;
};
int main() {
struct Client c[10];
int i;
// Input information of 10 clients
for (i = 0; i < 10; i++) {
printf("\nEnter details of client %d:\n", i + 1);
printf("Account ID : ");
scanf("%d", &c[i].accountID);
printf("Account Name : ");
scanf("%s", c[i].accountname);
printf("Address : ");
scanf("%s", c[i].address);
printf("Balance : ");
scanf("%f", &c[i].balance);
}
// Display information of 10 clients
printf("\n--- Client Information ---\n");
for (i = 0; i < 10; i++) {
printf("\nClient %d:\n", i + 1);
printf("Account ID : %d\n", c[i].accountID);
printf("Account Name : %s\n", c[i].accountname);
printf("Address : %s\n", c[i].address);
printf("Balance : %.2f\n", c[i].balance);
}
return 0;
}
Here the structure Client groups the four fields, an array c[10] stores 10 clients, the first loop inputs the data and the second loop displays it.
OR — File handling modes in C and a program to create and write to a file
File handling modes are passed as the second argument to fopen():
| Mode | Meaning |
|---|---|
"r" | Open an existing file for reading only. |
"w" | Open a file for writing; creates the file if it does not exist, and overwrites existing contents. |
"a" | Open a file for appending; data is added at the end without erasing existing contents. |
"r+" | Open an existing file for both reading and writing. |
"w+" | Create/overwrite a file for both reading and writing. |
"a+" | Open/create a file for reading and appending. |
(For binary files the suffix b is added, e.g. "rb", "wb".)
C program to create and write data into a file:
#include <stdio.h>
int main() {
FILE *fp;
char name[50];
// Open (create) the file in write mode
fp = fopen("data.txt", "w");
if (fp == NULL) {
printf("Error opening file!\n");
return 1;
}
printf("Enter your name: ");
scanf("%s", name);
// Write data into the file
fprintf(fp, "Name: %s\n", name);
fclose(fp); // Close the file
printf("Data written to data.txt successfully.\n");
return 0;
}
This program opens data.txt in write mode (creating it), writes the entered name using fprintf(), and then closes the file with fclose().
Frequently asked questions
- Where can I find the NEB Class 12 Computer Science question paper 2082?
- The full NEB Class 12 Computer Science 2082 (supplementary) 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 2082 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 2082 paper?
- The NEB Class 12 Computer Science 2082 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.