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

Monday, May 22, 2023

NEB Class 12 Computer Science 2080 Question Model Solved: A Guide

 NEB Class 12 Computer Science 2080 Question Model Solved





A detailed explanation of the NEB Class 12 Computer Science 2080 Question Model Solved is provided in this blog article. It includes a complete solution of the computer science question paper of 2080.  Anyone studying for the NEB Class 12 Computer Science test should read this article.


Group "A"

Very short answer questions.  9×1=9

1. Which of the given sign is used as a shortcut for JQuery?

a) the %sign

b) the & sign

c) the $ sign

d) the @ sign

 

2. Which of the following is DML statement?

a) Create

b) Select

c) Create view Alter

d) Drop

 

3. A collection of hyperlinked documents on the Internet is called:

a) HTML

b) Webpage

c) WWW

d) email system

 

4. Which of the following IPV4 address valid?

a) 192.168.1.1

b) EEE.003.33.000

c) 257.2.5.1

d) 202.70.71.262

 

5. Which JQuery method is used to hide selected elements?

a) hide ()

b) hide(on)

c) invisible()

d) display(none)

 

6. Which function is used to connect mySQL database?

a) mySqLi_open()

b) mySqLi_connect()

c) var mySqLi_query()

d) $mySqLi_con()

 

7. Which of the following is true about FILE *fpt?

a) FILE is a keyword in c for representing files and fpt is a variable of FILE type.

b) FILE is a buffered stream.

c) FILE is a stream.

d) FILE is a structure and fpt is a pointer to the structure of FILE type.

 

8. Which SDLC phase is used to ensure quality software?

a) implementation

b) maintenance

c) testing

d) system study

 

9. Coaxial cable is an example of …

a) Communication software

b) Guided transmission media

c) Unguided transmission media

d) All of them

 

Group "B"

Short answer questions           5×5=25

10. Explain the Relational data model with example. (5)

Ans: A relational database is a database that stores data in tables. Each table has a unique identifier called the primary key, and each row in the table represents a record. The columns of the table represent attributes of the data, and each record has a value for each attribute. This makes it easy to establish relationships between data points.

Here is a basic example of two tables that a small business might utilize to handle order processing for its products. The first table contains customer information, including their name, address, shipping and billing details, phone number, and other contact information. Each piece of information is stored in its own column, and a unique ID is assigned to each customer record. The second table, known as the customer order table, includes the customer ID, the product ordered, quantity, size, color, and other relevant order details, but it does not include the customer's personal information.

Although these two tables have only one common column, the ID, the relational database can establish a relationship between them. When the company's order processing application submits an order to the database, it can retrieve the necessary product order details from the customer order table. By using the customer ID from that table, it can then access the customer's billing and shipping information stored in the customer info table. This enables the warehouse to locate and ship the correct product, ensuring timely delivery to the customer, while allowing the company to receive payment for the order.

OR

Write SQL DDL commands to execute the following task with reference to the schema given below:

student_info(regno as integer, name as character(25), class integer, gender character91), address character(25)

Ans: To create the "student_info" table with the given schema, you can use the following SQL DDL (Data Definition Language) command:

CREATE TABLE student_info (

  regno INT,

  name VARCHAR(25),

  class INT,

  gender CHAR(1),

  address VARCHAR(25)

);

 

11. Define syntax for database connectivity. (1+4)

Write a server side scripting code to insert data into the table student having fields (first name, last name, mark and email: ) Assume that server name="localhost", username="root", password="", databasename="studentDB".

Ans: To establish database connectivity and insert data into the "student" table with the fields (first name, last name, mark, and email), you would typically use a programming language with appropriate database libraries. Here's an example using PHP as a server-side scripting language:

<?php

// Database connectivity parameters

$servername = "localhost";

$username = "root";

$password = "";

$dbname = "studentDB";

 // Establishing a connection to the database

$conn = new mysqli($servername, $username, $password, $dbname);

 // Checking the connection

if ($conn->connect_error) {

    die("Connection failed: " . $conn->connect_error);

}

 // Inserting data into the "student" table

$firstName = "Ram";

$lastName = "Sharma";

$mark = 85;

$email = "ram@example.com";

$sql = "INSERT INTO student (first_name, last_name, mark, email) VALUES ('$firstName', '$lastName', '$mark', '$email')";

 if ($conn->query($sql) === true) {

    echo "Data inserted successfully.";

} else {

    echo "Error: " . $sql . "<br>" . $conn->error;

}

 // Closing the database connection

$conn->close();

?>


OR

Write a JavaScript code to calculate the factorial of a given number. (5)

<html>

<head>

<title>javascript alert</title>

<body>

<script>

var num = prompt("Enter a number: ");

var factorial = 1;

 for (var i = 1; i <= num; i++) {

  factorial = factorial*i;

}

 alert("The factorial of " + num + " is " + factorial);

</script>

 </body>

</html>

 

12. How is even-driven program (or OOP) differing from procedural oriented programming? Explain. (5)

Ans: Following are the difference between OOP and procedural oriented programming.

 

Aspect

Object-Oriented Programming (OOP)

Procedural Programming

Focus

Objects and their interactions

Procedures and functions

Control Flow

Driven by objects and their methods

Linear, following a predefined sequence of instructions

Code Organization

Organized around classes, objects, and their relationships

Organized around functions and procedures

Data and Function Encapsulation

Encapsulation of data and functions within objects

Functions operate on data exposed globally or through parameters

Reusability

Promotes code reusability through objects and inheritance

Promotes code reusability through functions and subroutines

Modularity and Scalability

Promotes modularity and scalability through class hierarchy

Modularity and scalability can be achieved through functions

Data Sharing

Objects encapsulate data, and access is controlled through methods

Data can be shared through global variables

Code Flexibility and Maintenance

Provides better code flexibility, extensibility, and maintenance

Code maintenance can be more challenging due to global data

Examples

Java, C++, Python

C, Pascal, Fortran

 

13. Explain the importance of the system testing of the system development life cycle (SDLC). (1+4)

System testing is important because it helps to identify defects in the system before it is released to the customer or user. Defects can cause the system to crash, malfunction, or not meet the customer's needs. System testing can also help to identify security vulnerabilities in the system. Security vulnerabilities can be exploited by hackers to gain unauthorized access to the system.

System testing is a critical part of the SDLC. By identifying and fixing defects in the system during testing, you can help to ensure that the system is ready for use and that it is secure.

Here are some of the benefits of system testing:

  • It helps to ensure that the system meets its requirements.
  • It helps to identify defects in the system.
  • It helps to identify security vulnerabilities in the system.
  • It helps to improve the quality of the system.
  • It helps to reduce the risk of system failure.
  • It helps to save time and money.

System testing is an essential part of the SDLC. By following the best practices for system testing, you can help to ensure that your systems are reliable, secure, and meet the needs of your users.

 

14. What is cloud computing? Pointout the advantages and disadvantages of cloud computing. (1+4)

Cloud computing refers to the delivery of computing services, including storage, servers, databases, networking, software, and analytics, over the internet. Instead of owning and managing physical infrastructure, users can access and utilize these resources on-demand, paying only for the resources they consume. Here are the advantages and disadvantages of cloud computing:

Advantages of Cloud Computing:

Scalability: Cloud computing enables easy adjustment of resources based on demand, allowing organizations to efficiently meet changing needs.

Cost Savings: With reduced upfront costs and pay-as-you-go pricing, cloud computing offers a cost-effective model for businesses.

Accessibility: Cloud services can be accessed from anywhere with an internet connection, providing flexibility and remote access.

Reliability: High availability and redundancy of resources ensure reliable access and consistent service performance.

Data Backup: Automated backup and recovery services in the cloud protect data from loss and provide easy data restoration.

 Disadvantages of Cloud Computing:

Dependence on Internet: Cloud computing relies on stable internet connectivity, which can affect access to resources.

Security Concerns: Storing data in the cloud raises potential risks to data security and privacy that need to be addressed.

Limited Control: Organizations have reduced control over the underlying infrastructure in cloud computing environments.

Vendor Dependency: Switching providers or moving resources can be challenging, leading to vendor dependency.

Downtime: Cloud services may experience service disruptions and downtime, impacting accessibility and productivity.

 

Group "C"

Long answer questions 8×2=16

15. What is network topology? Differentiate between guided (wire media) and unguided (wireless media) with example. (2+6)

Network topology refers to the physical or logical arrangement of nodes and connections in a computer network. It defines how devices such as computers, servers, routers, and switches are interconnected and communicate with each other. Network topology determines the structure and communication flow within a network.

 Following are the differentiate between guided and unguided media.

Guided (Wire Media)

Unguided (Wireless Media)

Requires physical cables or wires to transmit data.

Does not require physical cables or wires for data transmission.

Provides a dedicated and fixed path for data transmission.

Allows for flexible and mobile communication without physical constraints.

Generally offers higher data transfer rates and lower latency.

Data transfer rates can be lower compared to guided media, and latency can be higher due to environmental factors.

Signal strength and quality are less affected by environmental factors.

Signal strength and quality can be influenced by obstacles, distance, interference, and environmental conditions.

Generally more secure due to the physical nature of the cables, making it harder for unauthorized access.

Wireless signals can be intercepted, making them potentially more vulnerable to unauthorized access.

Commonly used in wired LANs, WANs, and backbone networks.

Widely used for wireless LANs (Wi-Fi), cellular networks, satellite communications, and IoT devices.

Examples include twisted-pair cables, coaxial cables, and fiber optic cables.

Examples include radio waves, microwaves, and infrared waves.

 

16. Write the advantage of pointer. Write a C- program to enter radius of a football and find the area of football by using user define function. (3+5)

Ans: A pointer in C is a variable that stores the memory address of another variable. It allows direct access and manipulation of the memory location that holds the data.

Following are the advantages of pointer:

  • Pointers can be used to access memory locations directly, which can be more efficient than using other methods, such as arrays.
  • Pointers can be used to point to any type of data, which gives you a lot of flexibility in your programming.
  • Pointers can be used to simplify code by eliminating the need to pass large amounts of data around.
  • Pointers can be used to perform complex operations, such as dynamic memory allocation and linked lists.

 

#include <stdio.h>

float Football(float radius);

int main()

{

    float radius;

  printf("Enter the radius of a football: ");

  scanf("%f", &radius);

  float area = Football(radius);

  printf("The area of the football is %.2f\n", area);

  return 0;

}

 float Football(float radius) {

    float area = 3.14 * radius * radius;

  return area;

}


OR

Define the structure. Write a C-program using structure to input staff id, name and the salary of 50 staffs. Display staff id, name and salary of those staff whose salary range from 25 thousands to 40 thousands. (2+6)

Ans: A structure is a user-defined data type that allows you to combine different variables of different types under a single name. It allows you to group related data together to create a custom data structure.

 #include <stdio.h>

struct staff

{

  int id;

  char name[20];

  float salary;

};

int main() {

  struct staff staffs[50];

  for (int i = 0; i < 50; i++) {

    printf("Enter staff id: ");

    scanf("%d", &staffs[i].id);

    printf("Enter staff name: ");

    scanf("%s", staffs[i].name);

    printf("Enter staff salary: ");

    scanf("%f", &staffs[i].salary);

  }

   for (int i = 0; i < 50; i++) {

    if (staffs[i].salary >= 25000 && staffs[i].salary <= 40000) {

      printf("Staff id: %d\n", staffs[i].id);

      printf("Staff name: %s\n", staffs[i].name);

      printf("Staff salary: %.2f\n", staffs[i].salary);

    }

  }

  return 0;

}

No comments:

Post a Comment

Post Top Ad

Your Ad Spot

Pages