Computer for SEE and NEB

It is a complete SEE and NEB solution for computer science. It includes Computer Fundamentals, Database (SQL), Programming in C QBASIC, CSS, JavaScript, and PHP for beginners.

Breaking

Post Top Ad

Your Ad Spot

Friday, May 5, 2023

Class 12 NEB Computer Question Model Solution 2080

Class 12 NEB Computer Question Model Solution 2080



Are you looking for a complete and comprehensive solution to the Class 12 NEB Computer Question Model of 2080? Then, look no further. In this article, we will provide a step-by-step guide for Class 12 NEB Computer Question Model Solution 2080.

SUB: Computer Science

Grade : XII                 Time : 2 hrs            Full Marks: 50

 

GROUP A
Multiple Choice Questions
Choose the correct answer.[9x1=9]

1) In which normal form of database transitive dependency should not be occurred?
A) First
B) Third
C) Scond
D) All of the above

2) Which of the following techniques is used to grant privileges to users in a database?
A) Authentication
B) Isolation
C) Authorization
D) Backup

3) Which SQL command is used to display all the records from a table named STUDENT with “H” as the first letter in the field FNAME (FIRST NAME)?
A) SELECT * FROM STUDENT WHERE FNAME LIKE “H”
B) SELECT * FROM STUDENT WHERE FNAME LIKE “%H%”
C) SELECT * FROM STUDENT WHERE FNAME LIKE "H%"
D) SELECT * FROM STUDENT WHERE FNAME LIKE "%H";

4) Which of the following is a remote login service?
A) Te1net
B) FTP
C) All of the above
D) SMTP

5) Which of the following is a server-side scripting language?
A) PHP
B) MySQL
C) JavaScript
D) SQL

6) Which of the following keywords are used to declare a variable in JavaScript?
A) int or suppose
B) float or int
C) var or let
D) char or var

7) What will be the result of combining a string with another data type in PHP?
A) float
B) int
C) string
D) double

8) The process of hiding internal details of a program and exposing the functionality is .
A) Class
B) Polymorphism
C) Inheritance
D) Data Abstraction

9) Which of the following is not a phase of SDLC?
A) Analysis
B) Developing
C) Testing
D) Meeting


GROUP B

Short Answer Questions [5×5=25]

10. Suppose you are appointed as an IT expert in a Hotel. What kind of database system you preferred and why? [1+4]

Ans: If I were appointed as an IT expert in a hotel, I would prefer to use a relational database system. Relational databases are a type of database that stores data in tables. Each table has a set of columns and rows, and each row represents a single record. Relational databases are very efficient at storing and retrieving data, and they are also very scalable. This means that they can be easily expanded to handle large amounts of data.

In a hotel, a relational database would be used to store information about guests, rooms, reservations, and other important data. This information would be stored in separate tables, and it could be easily accessed and updated by hotel staff. A relational database would also be able to track changes to data, which would be helpful for auditing and troubleshooting purposes.

Here are some of the benefits of using a relational database in a hotel:
  • Efficiency: Relational databases are very efficient at storing and retrieving data.
  • Scalability: Relational databases can be easily expanded to handle large amounts of data.
  • Security: Relational databases can be secured using a variety of methods, such as passwords and encryption.
  • Compliance: Relational databases can be used to comply with a variety of regulations, such as the General Data Protection Regulation (GDPR).
OR

Most of the Hospitals prefer applying a relational database model for database design compared to other models. Justify the statement with your arguments. [5]

Ans: Here are some of the reasons why most hospitals prefer applying a relational database model for database design compared to other models:
  • Efficiency: Relational databases are very efficient at storing and retrieving data. This is because data is stored in tables, which are made up of rows and columns. Each row represents a single record, and each column represents a single attribute of that record. This makes it easy to find and access specific data points.
  • Scalability: Relational databases are also very scalable. This means that they can be easily expanded to handle large amounts of data. As a hospital grows, its database can grow with it.
  • Security: Relational databases can be secured using a variety of methods, such as passwords and encryption. This helps to protect patient data from unauthorized access.
  • Reliability: Relational databases are very reliable. They are designed to handle large amounts of data and to operate 24/7. This is essential for hospitals, which need to be able to access patient data at all times.
  • Flexibility: Relational databases are very flexible. They can be used to store a wide variety of data types, including text, numbers, dates, and images. This makes them a good choice for storing the complex data that is used in hospitals.
Overall, relational databases offer a number of advantages that make them a good choice for database design in hospitals. They are efficient, scalable, secure, reliable, and flexible.


11. Write a program in JavaScript to add the values of any two variables. [5]
Ans:

<!DOCTYPE html>
<html>
<head>
<title>Addition value of two variables with JavaScript</title>
</head>
<body>
<h1>Addition with JavaScript</h1>
<script>
// Declare two variables and assign them values
let num1 = 5;
let num2 = 7;
// Add the values of the two variables
let sum = num1 + num2;
// Display the result on the web page using document.write
document.write("<p>The sum of " + num1 + " and " + num2 + " is " + sum + ".</p>");
</script>
</body>
</html>

OR

How can you connect MYSQL database with PHP? Demonstrate with an example. [5]

Ans:

To connect a MySQL database with PHP, you can use the mysqli extension in PHP. Here's an example of how you can establish a connection between MySQL and PHP using mysqli_connect() function:

// Database configuration

$host = 'localhost'; // hostname or IP address of the database server
$username = 'root'; // username to access the database
$password = ''; // password to access the database
$dbname = 'your_database_name'; // name of the database

// Create a database connection
$conn = mysqli_connect($host, $username, $password, $dbname);

// Check if the connection was successful
if (!$conn) {
die("Connection failed: " . mysqli_connect_error());
}
echo "Connected successfully";



12. Differentiate between OOP and procedural-oriented language. [5]

Ans: Following are the differences between procedural and OOP language

OOP

Procedural-oriented Programming

Emphasis on creating objects

Emphasis on creating procedures/functions

Uses classes and objects to organize code

Uses functions/subroutines to organize code

Uses objects to store and manipulate data

Uses global/local variables to store and manipulate data

Promotes code reusability through inheritance and polymorphism

Does not have built-in support for code reusability

Promotes modular programming through the use of objects

Does not have built-in support for modularity

Uses encapsulation to hide the internal workings of an object

Does not have the concept of encapsulation

Examples: C++, Java, Python

Examples: Pascal, Fortran, C



13. State various stages of SDLC and explain any two. [1+2+2]

Ans: SDLC stands for Software Development Life Cycle. It is a structured approach to the development of software. The SDLC defines a series of steps that are followed to develop high-quality software. 
Following are the various stages of SDLC.
  • Planning
  • Analysis
  • Design
  • Development
  • Testing
  • Deployment
  • Maintenance
Here are the explanation of two of the stages of SDLC explained in more detail:

Requirements gathering: This is the first and most important stage of the SDLC. It is important to gather all of the requirements for the software product in this stage. This includes understanding the needs of the users, the business goals, and the technical constraints. If the requirements are not gathered correctly, the rest of the SDLC will be more difficult and expensive.

System design: This stage involves designing the overall architecture of the software system. This includes defining the components of the system, their interactions, and the data flows. The system design should be based on the requirements gathered in the previous stage. If the system design is not done correctly, the software system will be difficult to build, test, and maintain.

14. Explain mobile computing with its advantages. [5]

Ans: Mobile computing is the use of portable devices, such as smartphones, tablets, and laptops, to access information and services. Mobile computing is a rapidly growing field, and it is having a major impact on the way we live and work. Mobile devices are changing the way we communicate, access information, and entertain ourselves. As mobile devices become more powerful and sophisticated, they will continue to play an increasingly important role in our lives.

The advantages of mobile computing are as here under:

  • Portability: Mobile devices are small and lightweight, making them easy to carry and use on the go.
  • Connectivity: Mobile devices are typically connected to the internet, allowing users to access information and services from anywhere.
  • Personalization: Mobile devices can be personalized to the user's needs, making them more user-friendly.
  • Affordability: Mobile devices are becoming increasingly affordable, making them accessible to a wider range of people.
  • Entertainment: Mobile devices can be used for a variety of entertainment purposes, such as playing games, watching videos, and listening to music.
  • Increased productivity: Mobile computing can help users to be more productive by allowing them to work from anywhere, at any time.
  • Improved communication: Mobile computing can help users to communicate more effectively with others by allowing them to stay in touch via text, email, and social media.
  • Enhanced learning: Mobile computing can help users to learn new things by providing them with access to educational resources on the go.
  • Greater convenience: Mobile computing can make life more convenient by allowing users to access information and services without having to be at a computer.

GROUP C

Long Answer Questions [2×8=16]

15. Suppose you are appointed as an IT expert of any bank which network architecture you prefer and why? [2+6]

Ans: If I were appointed as an IT expert of any bank, I would prefer a client-server network architecture. This is because a client-server network is a scalable and secure architecture that is well-suited for the needs of a bank.

A client-server network is a type of network architecture in which there are two main types of computers: clients and servers. Clients are the computers that users use to access the network, and servers are the computers that provide resources to the clients. In a client-server network, the servers are typically more powerful than the clients, and they are responsible for storing data and providing services to the clients.

There are several advantages to using a client-server network for a bank.
  • Centralized management: In a client-server network, all the data and applications are stored on a central server, which makes it easier for network administrators to manage and maintain the network. They can control access to data and applications, monitor network usage, and apply security policies from a single location.
  • Scalability: Client-server architecture is highly scalable, as additional servers and resources can be added as needed to support more users and data. This makes it easy to expand the network as the organization grows without impacting the performance or reliability of the network.
  • Enhanced security: Centralized management of client-server networks makes it easier to implement and enforce security policies across the network. Security measures, such as firewalls, intrusion detection and prevention, and data encryption can be centrally managed, reducing the risk of security breaches.
  • Improved performance: Client-server networks can improve network performance by offloading processing power from the client devices to the server. This can result in faster response times, reduced network congestion, and better utilization of network resources.
  • Reliable data backup and recovery: In a client-server network, data is stored on a central server, which makes it easier to back up data regularly and recover data in the event of a disaster. This helps to ensure business continuity and minimizes the risk of data loss.
Overall, a client-server network architecture is a reliable, scalable, and secure solution for a bank's IT infrastructure. It provides centralized management, scalability, and data security, which are essential for a financial institution to protect its assets and maintain the trust of its customers.

16. Write a program in C using structure to enter the roll_number, name, and marks scored in english, computer, maths and nepali of 10 students. Also, display them in proper format along with the total marks. [Note: the marks should be between 0 and 100]. [8]

Ans:

#include <stdio.h>
struct student {
int roll_number;
char name[50];
int english;
int computer;
int maths;
int nepali;
int total;
};
int main() {
struct student students[10];
int i;
for (i = 0; i < 10; i++) {
printf("Enter the roll_number of student %d: ", i + 1);
scanf("%d", &students[i].roll_number);
printf("Enter the name of student %d: ", i + 1);
scanf("%s", students[i].name);
printf("Enter the marks of student %d in english: ", i + 1);
scanf("%d", &students[i].english);
printf("Enter the marks of student %d in computer: ", i + 1);
scanf("%d", &students[i].computer);
printf("Enter the marks of student %d in maths: ", i + 1);
scanf("%d", &students[i].maths);
printf("Enter the marks of student %d in nepali: ", i + 1);
scanf("%d", &students[i].nepali);
students[i].total = students[i].english + students[i].computer + students[i].maths + students[i].nepali;
}
printf("| Roll Number | Name | English | Computer | Maths | Nepali | Total |\n");
for (i = 0; i < 10; i++) {
printf("| %d | %s | %d | %d | %d | %d | %d |\n", students[i].roll_number, students[i].name, students[i].english, students[i].computer, students[i].maths, students[i].nepali, students[i].total);
}
return 0;
}

OR

Write a program in C to create and store name, gender, and phone no of students to a data file named "ADDRESS.DAT". The program should prompt the user whether to continue or not. The program should also display all the records in the proper format. [8]

#include <stdio.h>
#include <string.h>
int main() 
{
char name[50];
char gender;
char phone[15];
FILE *fptr;
fptr = fopen("ADDRESS.DAT", "ab+");
if (fptr == NULL) {
printf("Error opening file");
return 0;
}
char choice;
do 
{
printf("Enter name: ");
scanf("%s", name);
printf("Enter gender (M/F): ");
scanf(" %c", &gender);
printf("Enter phone number: ");
scanf("%s", phone);
fprintf(fptr, "%s %c %s\n", name, gender, phone);
printf("Do you want to add another record? (Y/N): ");
scanf(" %c", &choice);
while (choice == 'Y' || choice == 'y');
printf("\nAll records in ADDRESS.DAT:\n");
rewind(fptr);
while (fscanf(fptr, "%s %c %s", name, &gender, phone) != EOF) {
printf("Name: %s\nGender: %c\nPhone: %s\n\n", name, gender, phone);
}
fclose(fptr);
return 0;
}

Conclusion:


In conclusion, the model question paper for Class 12 Computer Science is a valuable resource for students who are preparing for the board exams. It provides a good overview of the topics that will be covered on the exam, and it can help students to identify areas where they need to focus their studies. By following the tips in this blog post, students can use the model question paper to prepare for the board exams and achieve their best possible results.


You may also like:



No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages