Class 12 Computer Science Question Paper
2080 with Solution [Grade Increment]
Class 12 Computer Science
I have provided the Class 12 Computer Science Grade Increment Question paper that was asked on April 10, 2080. In the Computer Science Question paper, there are a total of 50 full marks, with 18.5 marks needed to pass. To pass the accounting exam, students must score more than 27 marks. This Class 12 Computer Science Grade Increment Examination was held by the Nepal Examination Board (NEB), for those students, who got NG (Non-Graded) in Class 12 Computer Science Subject. Question Paper Solution
Sub. Code: 4281 'B'
NEB- GRADE XII
Computer Science
Grade Increment (Supplementary) Examination
Solution
Candidates are required to give their answers in their own words as far as practicable. The figures in the margin indicate full marks.
Time: 2 hrs. Full Marks: 50
Group 'A'
Very short answer questions. [9x1=9]
1. Which SQL keyword is used to retrieve data from a table?
a) SELECT (✔)
b) FROM
c) WHERE
d) JOIN
2. Which of the following principle apply to 2NF?
a) A table must have a primary key
b) All non-key attributes must be dependent on the primary key.(✔)
c) All attributes must be atomic
d) A table must have at least more than two attributes
3. Which of the following is a device that connects two or more networks and can filter and forward network traffic based on its destination address?
a) Switch
b) Router (✔)
c) Hub
d) Modem
4. Which JavaScript function use to text input?
a) alerto()
b) prompt() (✔)
c) confirm()
d) console.log()
5. Which of the following PHP functions is used to connect to a MySQL to database?
a) mysql_ connect)
b) mysqli _connect() (✔)
c pdo_connect()
d) db connect()
6. What is the correct way to open a file named "data.txt" in C for reading?
a) fopen("data.txt", *r*); (✔)
b) fopen("data.txt", "*w");
c) fopen("data.txt","a");
d) fopen("data.txt","rb");
7. Which of the following concepts in object-oriented programming refers to binding data and function into a single unit.
a) Encapsulation (✔)
b) Abstraction
c) Polymorphism
d) Inheritance
8. What does the term "QA" stand for in the software development process?
a) Quality Assurance (✔)
b) Quality Analysis
c) Quality Assessment
d) Quantity Assurance
9. What type of communication technology is commonly used in loT devices?
a) Wi-Fi
b) Bluetooth
c) Zigbee
d) All of the above (✔)
Group 'B'
Short answer questions: [5 x 5: 25]
10. Describe the second normal form (2NF) with an example.
OR,
What is the importance of database security in database management systems? Describe.
11. How do you add an event handler in JavaScript? Give an example.
Answer: In JavaScript, you can add an event handler to an HTML element using the addEventListener method. This method allows you to specify the event type (e.g., "click", "mouseover", "keydown") and a function that should be executed when the event occurs.
<!DOCTYPE html>
<html>
<head>
<title>Event Handler Example</title>
</head>
<body>
<button id="myButton">Click me!</button>
<script>
// Function to handle the button click event
function handleButtonClick() {
alert('Button clicked!');
}
// Get a reference to the button element
var button = document.getElementById('myButton');
// Add an event listener for the 'click' event
button.addEventListener('click', handleButtonClick);
</script>
</body>
</html>
In this example, we define a function handleButtonClick that will be called when the button is clicked. We then use addEventListener to add the handleButtonClick function as the event handler for the "click" event on the button element with the ID "myButton". When the button is clicked, the handleButtonClick function will be executed, and it will display an alert saying "Button clicked!".
Or,
Explain the database connection PHP function for MySQL.
12. Describe the object and class in OOPs with an example.
13. Explain the agile software development methodology in brief.
14. Give any five examples of Al-related applications.
Group 'C*
Long answer questions: [2x8: 16]
15. Compare the bus and star network topology. Which of the network cable is suitable to design star topology in the school's network? Justify. 4+4
16. Write a program to store five employees* records (EID, Name, post and department) and display them using structure.
Answer:
#include
#include
const int MAX_EMPLOYEES = 5;
struct Employee {
int EID;
std::string name;
std::string post;
std::string department;
};
int main() {
Employee employees[MAX_EMPLOYEES];
// Input employee records
for (int i = 0; i < MAX_EMPLOYEES; ++i) {
std::cout << "Enter details for Employee " << i + 1 << ":\n";
std::cout << "Employee ID: ";
std::cin >> employees[i].EID;
std::cin.ignore(std::numeric_limits::max(), '\n'); // Clear newline from input buffer
std::cout << "Name: ";
std::getline(std::cin, employees[i].name);
std::cout << "Post: ";
std::getline(std::cin, employees[i].post);
std::cout << "Department: ";
std::getline(std::cin, employees[i].department);
}
// Display employee records
std::cout << "\nEmployee Records:\n";
for (int i = 0; i < MAX_EMPLOYEES; ++i) {
std::cout << "Employee " << i + 1 << ":\n";
std::cout << "Employee ID: " << employees[i].EID << "\n";
std::cout << "Name: " << employees[i].name << "\n";
std::cout << "Post: " << employees[i].post << "\n";
std::cout << "Department: " << employees[i].department << "\n\n";
}
return 0;
}
OR,
Describe file handling modes on C. Write a C program to create and write data into a file.
Answer:
#include <stdio.h>
int main() {
FILE *filePointer;
char data[100];
// Open the file in write mode
filePointer = fopen("example.txt", "w");
if (filePointer == NULL) {
printf("Unable to create the file.\\n");
return 1;
}
printf("Enter data to write to the file: ");
fgets(data, sizeof(data), stdin);
// Write data to the file
fprintf(filePointer, "%s", data);
// Close the file
fclose(filePointer);
printf("Data written to the file successfully.\\n");
return 0;
}
This website's content is copyrighted and cannot be reproduced without written permission. It's for informational purposes only, and not a substitute for professional advice. Unauthorized use may result in legal action. Don't use it on other sites or social media without approval.
Read More: Class 12 Accounting Question paper with solution (Grade Increment Examination)
Exercise Solution
FAQ
1. What is the pass mark for Class 12 Computer Science?
Answer: 18 marks is the passing mark for the NEB Class 12 Computer Science subject.
2. What is the full mark for the theory and practical exam of the NEB Class 12 Computer Science exam?
Answer: The full mark for the theory exam is 50, and the full mark for the practical exam is also 50 in the NEB Class 12 Computer Science exam.
3. Will I receive a star on the mark sheet after passing the NEB Class 12 Computer Science Grade Increment Question?
Answer: Yes, you will receive a star on the mark sheet after passing the NEB Class 12 Computer Science Grade Increment Examination.