NEB Class 12 · Past paper
The complete NEB Class 12 2078 exam paper for Computer Science, all 15 questions with solved model answers.
Tap a question to open its answer.
(a) Describe the switch statement with example. (b) Demonstrate the FOR loop with example.
What is array ? Write a program to input any 10 numbers in an array and display it.
(a) Define 'function' in C. Write a program to calculate the factorial of given number using function.
Why do you use structure ? Write a program to input teacher id, name address and subject of 10 teachers and display them properly using structure.
What is pointer ? write a program to enter the name, mobile and post of employee and write it in file " worker.dat" in C program.
Write a short description about common phases of SDLC.
Explain the different types of integrity constraints in DBMS.
Explain the Entities Relation Diagram with real example.
Compare the Coaxial, UTP and Optical cable.
Describe an OSI reference model.
What are the logical operators in C ? Explain with an example.
Logical operators in C combine or invert conditions and yield a result that is either 1 for true or 0 for false. They are used to build a compound condition out of simpler relational tests, typically inside an if statement or a loop. C provides three.
Logical AND (&&) gives true only when both its operands are true. (a > 0 && b > 0) is true only if both numbers are positive.
Logical OR (||) gives true when at least one of its operands is true, and false only when both are false. (ch == 'y' || ch == 'Y') is true for either case of the letter.
Logical NOT (!) is a unary operator that reverses the truth of its operand, so !(a == b) is true exactly when a is not equal to b.
Their truth table, with any non zero value counting as true:
| a | b | a && b | a || b | !a |
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 1 |
| 0 | 1 | 0 | 1 | 1 |
| 1 | 0 | 0 | 1 | 0 |
| 1 | 1 | 1 | 1 | 0 |
An important property is short circuit evaluation: in && the second operand is not evaluated at all if the first is false, and in || it is not evaluated if the first is true, since the answer is already settled.
#include <stdio.h>
int main() {
int year;
printf("Enter a year: ");
scanf("%d", &year);
if ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0))
printf("%d is a leap year.\n", year);
else
printf("%d is not a leap year.\n", year);
return 0;
}
The condition uses all the ideas together. A year is a leap year if it is divisible by 4 and not by 100, which is the first bracket joined by &&, or if it is divisible by 400, which is the second bracket joined by ||. For 2000 the first bracket is false (2000 is divisible by 100) but the second is true, so the whole condition is true. For 1900 both brackets are false and the year is not a leap year. For 2024 the first bracket is true, and because || short circuits, the second is never tested.
Describe the object-oriented concept in programming.
Explain the Artificial Intelligence and its applications.
How do you protect yourself from the cybercrime ? Suggest.
Write short notes on: a) e-Governance b) Data security
(a) e-Governance.
e-Governance is the use of information and communication technology, chiefly the internet, by a government to deliver its services and information to citizens, businesses and its own agencies, and to conduct its internal administration. Its aim is to make government more efficient, transparent, accountable and accessible, reducing the paperwork, the delay and the opportunities for corruption that attend a manual office, and letting a citizen deal with the government without travelling to it.
Its four interactions are commonly distinguished as G2C (government to citizen), such as applying online for a citizenship certificate, passport, licence or utility bill payment; G2B (government to business), such as company registration, e-tendering and online tax filing; G2G (government to government), the exchange of data between departments and between central and local bodies; and G2E (government to employee), covering payroll, records and training for staff.
In Nepal it appears in the online passport and driving licence systems, the PAN and VAT filing of the Inland Revenue Department, the Public Service Commission's online application, land record computerisation and the official portals of the ministries. The benefits are speed, lower cost, transparency and round the clock availability. The obstacles are limited internet access and electricity in rural areas, low computer literacy, the cost of infrastructure, resistance from staff accustomed to manual work, and the need to keep citizens' data secure.
(b) Data security.
Data security means protecting data from unauthorised access, alteration, disclosure or destruction, whether accidental or deliberate, throughout its life. It rests on three goals, together called the CIA triad: confidentiality, that only authorised people can read the data; integrity, that the data is not altered by anyone not authorised to do so and is accurate; and availability, that it is there when the authorised user needs it.
The threats it guards against include hacking and unauthorised access, viruses and other malware, ransomware, theft or loss of a device, insider misuse, and simple hardware failure or natural disaster.
The measures used are authentication by password, smart card or biometrics to establish who the user is, and authorisation with access rights so that each user reaches only the data the work requires; encryption, which turns readable data into cipher text that is useless without the key, both in storage and in transit; firewalls and antivirus software to keep intrusions and malware out; regular backups kept in a separate place, which is the only protection against destruction of data; audit trails that record who did what and when; and physical security such as locked server rooms, controlled entry and an uninterruptible power supply. Legal protection is provided in Nepal by the Electronic Transaction Act, 2063, which makes unauthorised access to and damage of data a punishable offence.