NEB Class 12 · Past paper
The complete NEB Class 12 2079 exam paper for Computer Science, all 19 questions with solved model answers.
Tap a question to open its answer.
Which of the following SQL statement is used to DELETE rows from a database table? A) DELETE B) REMOVE C) DROP D) CLEAR
A field that is used to uniquely called: A) Primary Key B) Entity C) Relationship D) Constraints
What does "MAC" stands A) Mandatory Access Control B) Media Access Control C) Micro Access Control D) Media Access Certificate
What is the correct syntax for referring to an external JavaScript script? A) <script src="myscript.js"></script> B) <script href="myscript.js"></script> C) <js href="myscript.js"></js> D) <js src="myscript.js"></js>
Which of the following is the correct way of defining a variable in PHP? A) $variable name = value; B) $variable_name = value; C) $variable_name= = value D) $variable name as value;
What is the output of C program? void main(){ int b=25; int *p; p=&b; printf("%d %d", &b, p);}
The correct option is B) 1234 1234 (taking the address of b to be 1234, as marked in the question). Since p = &b;, the pointer p is assigned the same address as &b, so printf("%d %d", &b, p) prints the same address value twice.
Which feature of OOP illustrates the code reusability? A) Polymorphism B) Abstraction C) Encapsulation D) Inheritance
Which of following is the discovering requirement from a user in the requirement collection process? A) Feasibility study B) Requirement Elicitation C) Requirement Specification D) Requirement validation
What devices are detecting and responding to changes in an environment that are embedded in smart phones and an integral part of the Internet of Things (IoT)? A) Wi-Fi B) Barcode C) RFID D) Sensors
Differentiate the centralized and distributed database system.
What are the purposes of normalization ? Give an example of 2NF.
Normalization is the process of organizing the fields and tables of a relational database so as to reduce data redundancy and avoid update, insertion and deletion anomalies. Its main purposes are to eliminate duplicate data, to ensure that related data is stored logically together, to keep the database consistent when data is changed, and to make the database structure easier to maintain and extend.
Example of Second Normal Form (2NF): a table is in 2NF when it is already in 1NF and every non key attribute depends on the whole primary key, not just part of it. Consider a table with a composite key (StudentID, CourseID):
| StudentID | CourseID | StudentName | CourseName |
|---|---|---|---|
| 1 | C1 | Ram | C Programming |
| 1 | C2 | Ram | Database |
Here StudentName depends only on StudentID (not on the whole key), which is a partial dependency and violates 2NF. To achieve 2NF, the table is split into:
Student(StudentID, StudentName) and Enrollment(StudentID, CourseID, CourseName)
so that every non key column now depends on the full primary key of its own table.
Write a program to find the factorial of any number using Javascript.
How do you fetch data from a database in PHP and display it in form ? Describe.
Compare the OOPs and procedural programing language.
What are the major activities performed to design the software ? Describe.
Software design is the phase of the SDLC where the requirements gathered earlier are turned into a blueprint for construction. Its major activities are:
Carrying out these activities carefully before coding begins helps ensure that the final software meets the requirements, is easy to build, and is easy to test and maintain afterward.
Explain the popular five-application areas of AI.
Compare the star and ring topology with pros and cons. Which of data communication cable is more appropriate to design the local area network ? Describe.
What is structure ? Write a program to input roll, name and age of 5 students and display them properly using structure.
A structure in C is a user defined data type that groups together variables of different data types under a single name, so that related information (such as a student's roll number, name and age) can be handled as one unit.
#include <stdio.h>
struct Student {
int roll;
char name[30];
int age;
};
int main() {
struct Student s[5];
int i;
for (i = 0; i < 5; i++) {
printf("Enter roll, name and age of student %d: ", i + 1);
scanf("%d %s %d", &s[i].roll, s[i].name, &s[i].age);
}
printf("\nRoll\tName\tAge\n");
for (i = 0; i < 5; i++)
printf("%d\t%s\t%d\n", s[i].roll, s[i].name, s[i].age);
return 0;
}
The structure Student bundles roll, name and age together, and the array s[5] holds five such records. The first loop reads each student's data into s[i].roll, s[i].name and s[i].age, and the second loop prints those same fields for all five students in a tabular form.
Write a C program to enter ID, employee_name, and post of the employee and store them in a data file named "emp.txt". Display each record on the screen in an appropriate format.
Which of the following is the correct way of defining a variable in PHP? A) variable_name = value; C) variable name as value;
The correct option is B) sign followed by a letter or underscore, and it cannot contain spaces, so multi word names are written with an underscore, for example