Friday, March 28, 2025

[SOLUTION] SET A PABSON SLC PRE-BOARD EXAM 2081(2025)



PABSON

 SLC PRE-BOARD EXAM

2081

Grade: XII   

                                       Subject: Computer                 Full Marks: 50                             Time: 2:15  hrs                                                                                                                                                     

 Candidates are required to give their answer according to the given instructions.

Attempt all questions

                       Group A (Multiple choice question)

Select the best answer from the following alternatives.                  1×9 = 9

1.    In which of the following switching methods, the message is divided into small packets?

a.    Message switching                           b.           Packet switching

c.     Virtual switching                d.           None of the these

Note: In packet switching, messages are divided into small packets before transmission.

2.    A _________ set of rules that governs data communication

a.    Protocols                                          b.           Standards

c.     RFCs                                                  d.           Servers

Note: Protocols are a set of rules that govern data communication.

3.    Which of the following is not the phase of classical waterfall model?

a.    Feasibility Study                b.           Requirement Analysis

c.     Building Protype               d.           Maintenance

Note: The classical waterfall model does not include prototyping; it follows a linear and sequential approach.

4.    Which of the following is generally used for performing tasks like creating the structure of the relations, deleting relation?

a.    DML(Data Manipulation Language)

b.    Query

c.     Relational Schema

d.    DDL(Data Definition Language)

Note: DDL is used for defining and modifying database structures.

5.    The term "DFD" stands for?

a.    Data file diagram

b.    Data flow document

c.     Data flow diagram

d.    None of the above

Note: DFD stands for Data Flow Diagram, which represents the flow of data in a system.

6.    What will be the output of the following code snippet?

#include <stdio.h>

int main() {

       int a = 3, b = 5;

       int t = a;

       a = b;

       b = t;

       printf("%d %d", a, b);

       return 0;

}

      Note: The code swaps the values of a and b using a temporary variable t. So, Answer is 5,3

7.    What is the size of a C structure.?

a.    C structure is always 128 bytes.

b.    Size of C structure is the total bytes of all elements of structure.

c.     Size of C structure is the size of largest element.

d.    None of the above

Note: The size of a structure depends on the sum of its elements, considering padding and alignment.

8.    String values in PHP must be enclosed within -

a.    Double Quotes ""              b.              Single Quotes ' '

c.     Both (a) and (b)                 d.           None of the above

Note: String values in PHP can be enclosed in either single (' ') or double (" ") quotes.

9.    Which of the following variable name is invalid?

a.    $newVar                                           b.           $new_Var

c.     $new-var                                          d.           All of the above

Note: In PHP, variable names cannot contain hyphens (-).

 

Group B:

Short Answer Questions                                                (5 × 5=25)            

1.    What is data security? How can it be implemented?

Ans:

Data security is the practice of protecting digital information from unauthorized access, corruption, or theft throughout its entire lifecycle.

It involves a set of strategies, processes, and technologies designed to ensure the confidentiality, integrity, and availability of data.

Data security can be implemented through multiple techniques as given below:

a)       Authentication & Access Control: Use strong passwords, multi-factor authentication (MFA), and role-based access control (RBAC) to restrict unauthorized access.

b)       Data Encryption: Secure sensitive data using encryption algorithms (AES, RSA) and protect data transmission with SSL/TLS protocols.

c)       Firewalls & Network Security: Monitor and block cyber threats using firewalls, intrusion detection, and prevention systems (IDPS).

d)       Backup & Disaster Recovery: Regularly back up data and implement a disaster recovery plan to restore lost information.

e)       Regular Security Updates: Keep software, databases, and systems updated with the latest security patches to prevent vulnerabilities.

 

OR

       What is RDBMS? List Out the functions of RDBMS.

Ans:

      RDBMS (Relational Database Management System) is a type of database management system that stores data in a structured format using tables (relations) with rows and columns. It follows the relational model, which was introduced by E.F. Codd in 1970.

      RDBMS provides various functionalities for efficient database management as given below:

a)       Data Storage & Retrieval: Efficiently stores large amounts of structured data and retrieves it using SQL queries.

b)       Data Integrity & Consistency: Ensures accuracy through constraints like Primary Key, Foreign Key, Unique, and Check.

c)       Transaction Management: Maintains ACID (Atomicity, Consistency, Isolation, Durability) properties for reliable transactions.

d)       Data Security: Provides authentication, access control, and encryption to protect data from unauthorized access.

e)       Data Manipulation: Allows CRUD operations (Create, Read, Update, Delete) using SQL commands.

 

 

2.    Write a JavaScript program to calculate simple interest using Principal, rate and time.

Ans:

<!DOCTYPE html>

<html>

<head>

    <title>Simple Interest Calculator</title>

</head>

<body>

    <script>

        function calculateSimpleInterest()

        {

            var p, r, t, si;

            p = parseFloat(prompt("Enter Principal Amount:"));

            r = parseFloat(prompt("Enter Annual Interest Rate (%):"));

            t = parseFloat(prompt("Enter Time (years):"));

                si = (p * r * t) / 100;

            document.write("Simple Interest: " + si);

        }

        calculateSimpleInterest();

    </script>

</body>

</html>

OR

       Write a PHP program to insert data in a database.

Ans:

      A server-side scripting code to insert data into the table student having fields (first name, last name, mark and email) is as follows:

<?php

// Step 1: Database configuration

$servername = "localhost";

$username = "root";

$password = "";

$database = "studentDB";

//Step2: Database connection

$con = new mysqli($servername, $username, $password, $database);

// Step 3: Check connection

if ($con->connect_error)

{

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

} else {

    echo "Connected successfully!";

}

// Step 4: Prepare the SQL statement for insertion

$sql = "INSERT INTO student (first_name, last_name, mark, email)

             VALUES ('Madhav', 'Sapkota', 30, 'madhav@gmail.com')";

// Step 5: Execute the query and check if data is inserted

if ($con->query($sql) === TRUE)

{

    echo "Data inserted successfully";

} else {

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

}

// Step 5: Close connection

$con->close();

?>

 

3.    Explain the concept of classes, objects, polymorphism, and inheritance in OOP.

Ans:

Class:

A class is a blueprint or template for creating objects. It defines a set of properties (attributes) and methods (functions) that the objects created from the class will have. The class acts as a prototype from which individual objects are created, encapsulating data for the object and methods to manipulate that data.

Object:

An object is an instance of a class. It is a specific realization of a class with actual values for the properties defined by the class. Objects can interact with one another through methods, making them the building blocks of an application. The object represents a real-world entity that combines both   attributes(data) and behaviours (methods/functions).

Inheritance:

In Object-Oriented Programming (OOP), inheritance is a fundamental concept that allows a class (called a subclass or derived class) to inherit properties and behaviours (methods and attributes) from another class (called a superclass or base class).

Polymorphism:

Polymorphism refers the ability of an object to take on different forms depending upon situations. The same method(function) can behave differently on different classes. 

 

4.    What is a feasibility study? Explain different types of feasibility studies.

Ans:

      A feasibility study is a detailed analysis that assesses the practicality and viability of a proposed project or plan. It aims to determine whether the project is likely to succeed by evaluating various factors (level/types/components) as follows:   

      1. Technical Feasibility: Assesses the availability and suitability of the required technology and resources. Example: A company wants to develop a mobile app but checks if their developers have the right skills and tools to create it.

      2. Economic Feasibility: Evaluates the financial viability of the project, including cost-benefit analysis, return on investment, and funding options. Example: A startup plans to build an e-commerce website and calculates if they have enough budget for development and maintenance.

      3. Legal Feasibility: Examines potential legal and regulatory implications, such as intellectual property rights, data privacy, and licensing requirements. Example: A company wants to launch a social media app and checks if it complies with data privacy laws.

      4. Operational Feasibility: Assesses the impact of the project on existing operations, including organizational changes, user acceptance, and training needs. Example: A school wants to introduce an attendance tracking system and checks if teachers and students can easily use it.

      5. Scheduling Feasibility: Determines the project timeline, resource allocation, and potential risks and develops contingency plans. Example: A software company plans to release a new game and ensures it can be completed before the holiday season.

 

5.    What is e-governance? Explain its importance in country like Nepal.

Ans:      

       E-Government refers to the use of technology, especially the internet, to provide government services, enhance public administration, and engage with citizens. Examples: Online tax filing, digital voter registration, and e-governance portals.

       E-Government plays a crucial role in a developing country like Nepal, where geographical challenges, bureaucratic inefficiencies, and limited access to public services have long been obstacles.

       Some key Importances of E-Government in Nepal are as follows:

a)       Better Accessibility – Citizens in remote areas can access services online without traveling.

b)       Increased Efficiency – Reduces paperwork, speeds up processes, and minimizes bureaucracy.

c)       Transparency & Accountability – Online platforms reduce corruption and ensure open governance.

d)       Economic Growth – Encourages digital literacy, attracts investment, and supports IT sector development.

e)       Disaster Management – Helps in quick response during emergencies like earthquakes and pandemics.

f)        Cost-Effective Governance – Reduces administrative costs and improves service delivery.

Conclusion: E-Government is key to making governance in Nepal more efficient, transparent, and citizen-friendly.

Group C:

Long Answer Questions                                                              (2 × 8=16)

6.    What do you mean by transmission media? Explain Guided Media and Unguided Media.

Ans:

      A transmission medium, also known as communication media is a pathway that carries the information from the sender to the receiver. It can be either guided (wired) or unguided (wireless) as explained below:

1. Guided Media: Guided media refers to transmission that uses a physical pathway to direct signals from the sender to the receiver.

Key Characteristics:

a) The signal is confined to a path/medium/channel.

b) Usually more secure and less affected to interference and environmental factors like weather compared to unguided media.

c) Suitable for short to medium distances.

Examples:

a) Twisted Pair Cable: Used in telephone lines and Ethernet cables.

b) Coaxial Cable: Used for cable TV and broadband connections.

c) Optical Fiber: Used for high-speed internet and long-distance communication.

Applications: Local area networks (LANs), wired telephony, and high-speed internet.

 

2. Unguided Media: Unguided media refers to wireless transmission where the signal travels through free space (air, vacuum, or water) without a physical conductor.

Key Characteristics:

a) The signal is broadcast in all directions and can be intercepted easily.

b) Usually less secure and more affected to interference and environmental factors like weather.

c) Suitable for long distances or areas where laying physical cables is impractical.

Examples:

a) Radio Waves: Used in AM/FM radio, television broadcasts, and mobile phones.

b) Microwaves: Used in satellite communication and point-to-point links.

c) Infrared and Laser Signals: Used in remote controls and point-to-point communication in limited ranges.

Applications: Mobile networks, Wi-Fi, satellite communication, and broadcasting.

 

7.    What is structure? Create a structure to store the name and salary of 100 employees and display the names of the employee getting salary between 10000 and 25000.                    

Ans:

         A structure in C is a user-defined data type that allows grouping variables of different types under a single name. This helps to logically organize and manage related data. It is defined and declared using the ‘struct’ keyword followed by the structure name and a set of curly braces.

For example:

struct Student

{

    int id;

    float marks;

} s1;

 

A structure to store the name and salary of 100 employees and display the names of the employee getting salary between 10000 and 25000 is as follows:

#include <stdio.h>

#include <conio.h>

struct staff

{

    char name[20];

    int sal;

};

void main()

{

    struct staff s[100];

    int i ;

    clrscr();

    for (i = 0; i < 100; i++)

    {

        printf("Enter Name: ");

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

        printf("Enter Salary: ");

        scanf("%d", &s[i].sal);

    }

    printf("\nEmployees with salary between 10,000 and 25,000:\n");

    printf("\nNAME\tSALARY");

    for (i = 0; i < 100; i++)

    {

        if (s[i].sal > 10000 && s[i].sal < 25000)

        {

            printf("\n%s\t%d", s[i].name, s[i].sal);

        }

    }

    getch();

}

OR

       Write a C program to get the name, address and grade of 15 students. Create a data file name “std.txt” and store the provided details. 

Ans:

#include <stdio.h>

#include <conio.h>

void main()

{

    char name[50], address[100], grade[10];

    int i;

    FILE *fptr;

 

    clrscr();

    fptr = fopen("std.txt", "w");

    if (fptr == NULL)

    {

        printf("Error opening file!");

        return;

    }

    for (i = 0; i < 15; i++)

    {

        printf("Enter name: ");

        scanf("%s", name);

        printf("Enter address: ");

        scanf("%s", address);

        printf("Enter grade: ");

        scanf("%s", grade);

        fprintf(fptr, "%s\t%s\t%s\n", name, address, grade);

    }

    fclose(fptr);

 

    fptr = fopen("std.txt", "r");

    if (fptr == NULL)

    {

        printf("Error opening file!");

        return;

    }

    printf("NAME\tADDRESS\tGRADE\n");

 

    while (fscanf(fptr, "%s %s %s", name, address, grade) != EOF)

    {

        printf("%s\t%s\t%s\n", name, address, grade);

    }

    fclose(fptr);

    getch();

}