[SOLUTION] SET D1 HISSAN CENTRAL EXAMINATION-2081 (2025)
HISSAN CENTRAL EXAMINATION-2081 (2025)
Grade: XII Time: 2 Hrs FM: 50
Candidates are required to give their answers in their own words
as far as practicable. The figures in the margin indicate full marks.
GROUP A
Multiple Choice Questions.
Tick / Select the best alternative.
[9×1=9]
- The
key that identifies each record uniquely, is called
a) Primary Key
b) Record Key
c) Unique Key
d) Keyword - Which
SQL statement is used to modify data in an existing table?
a) CREATE
b) ALTER
c) UPDATE
d) DELETE - Which
of the following is used to display the output in PHP?
a) echo
b) print
c) ? write
d) both (a) and (b) - What
is the correct way to write “if” statement in JavaScript?
a) if i=7 then.
b) if (i == 7)
c) if i==7
d) if i = 7 - A
function which calls itself is called a ………
a) Self-Function
b) Auto Function
c) Recursive Function
d) Static Function - Which
device provides path for the packets for data transmission?
a) Hub
b) Router
c) Switch
d) Repeater - PaaS
stands for…..
a) Public as a service
b) Platform as a Service
c) Protocol of a Service
d) Policy as a Service
- Which
feature of OOP indicates code reusability?
a) Abstraction
b) Polymorphism
c) Encapsulation
d) Inheritance - Which
SDLC model is best suited for projects where requirements change
frequently?
a) Waterfall model
b) Spiral model
c) Agile model
d) V-shaped model
GROUP B
Short Answer Questions [5×5=25]
- What
is Database? Explain centralized and distributed database. [2+3]
Ans:
Databases can be categorized based on
their storage and management into Centralized Databases and Distributed
Databases.
1. Centralized Database
A centralized database is a database
system where all the data is stored and managed in a single location, typically
on a single server or mainframe. Users from different locations access this
database through a network.
Characteristics of Centralized
Database:
a)
Stored in a single location.
b)
Managed and controlled by a central database
management system (DBMS).
c)
Users access data through client applications
over a network.
Example of Centralized Database:
a)
Banking systems (core banking databases)
b)
University student record systems
c) Government databases
2. Distributed Database
A distributed database is a database
system where data is stored across multiple locations (servers or sites),
connected through a network. Each site maintains its own database and
communicates with others.
Types of Distributed Databases:
1)
Homogeneous Distributed Database: All sites
use the same DBMS and structure.
2)
Heterogeneous Distributed Database: Different
sites may have different DBMSs and structures.
Characteristics of Distributed
Database:
a)
Data is spread across multiple locations.
b)
Can be replicated or fragmented across different
sites.
c)
Sites communicate via a network.
Example of Distributed Database:
a)
Cloud storage services (Google Drive, Amazon
S3)
b)
Online e-commerce platforms (Amazon, eBay)
c) Social media platforms (Facebook, Instagram)
OR
Explain any two types of database model. [5]
Ans:
A database model is a logical design
and structure that defines how data is stored, organized, and manipulated in a
database. Any two types of database model are explained below:
Hierarchical Database Model:
Hierarchical database model is one of
the old and simplest database models in which records are logically organized
in the form of an inverted tree. It starts with the root node (parent) at the
top and the branch (child) formed below.
Ø In this model, each record (node) has a single
parent, but it can have multiple children, creating a hierarchy of data and
one-to-one and one-to-many parent-child relationships.
Ø Example: A diagram representing a network database model is as follows: Draw from Note
Network Database Model:
The network database model is a
modified version of the hierarchical database model in which records are
logically organized in the form of a graph-like structure, where one record can
have multiple parents and also multiple children, creating a network of data.
Ø It supports one-to-one, one-to-many, and
many-to-many relationships.
Ø Example: A diagram representing a network database model is as follows: Draw from Note
- Write
JavaScript code to find the factorial value of a number. [5]
Ans:
<!DOCTYPE html>
<html>
<head>
<title>Factorial
of a Number</title>
</head>
<body>
<script>
function
calculateFactorial()
{
var n, fact = 1;
n = parseInt(prompt("Enter a number:"));
if (isNaN(n) || n < 0)
{
document.write("Invalid input! Please enter a
non-negative integer.");
return;
}
for (var i = 1; i <= n; i++) {
fact = fact * i;
}
document.write("The factorial of " + n + " is: " +
fact);
}
calculateFactorial();
</script>
</body>
</html>
Example Output:
Enter a number: 5
The factorial of 5 is: 120
OR
Differentiate between Client-Side Scripting and Server-Side Scripting. [5]
Ans:
Scripting in web development is
broadly categorized into server-side and client-side scripting.
Both play crucial roles in building dynamic and interactive web applications.
1. Server-Side Scripting: Server-side
scripting is executed on the web server before the page is sent to the user’s
browser. It is used to handle database operations, authentication, and business
logic.
2. Client-Side Scripting: Client-side
scripting is executed on the user’s browser, allowing web pages to be
interactive and dynamic without constant communication with the server.
Key Differences:
Feature (Aspect) |
Server-Side Scripting |
Client-Side Scripting |
Execution |
On the web server |
On the user’s browser |
Performance |
Slower due to server processing |
Faster as it runs locally |
Security |
More secure (hidden from users) |
Less secure (visible to users) |
Use Cases |
Authentication, database handling, API requests |
UI interactions, animations, form validation |
Examples |
PHP, Node.js, Python, Java |
JavaScript, HTML, CSS |
- Why
are polymorphism and inheritance important? [5]
Ans:
Inheritance and polymorphism are two
fundamental features of Object-Oriented Programming (OOP) that provide
significant benefits to programmers. Here's how they help:
1. Inheritance (Code Reusability &
Hierarchy):
Inheritance allows programmers to
create new classes based on existing ones, reducing redundancy and improving
maintainability. This provides several advantages(importances):
a) Code Reusability: Common
functionalities are defined in a base class and reused in derived classes.
b) Faster Development: New classes can
inherit existing logic instead of writing from scratch.
c) Scalability: Easy to extend
existing code with additional features.
d) Better Organization: Establishes a
clear relationship between general and specific classes.
2. Polymorphism (Flexibility &
Dynamic Behaviour):
Polymorphism enables objects to take
multiple forms, allowing programmers to write more flexible and scalable code.
This provides several advantages(importances):
a) Method Overriding: Subclasses can
modify inherited methods for specific behaviour.
b) Method Overloading: Allows multiple
functions with the same name but different parameters, improving readability.
c) Dynamic Binding (Runtime
Polymorphism)
d) Simplifies Code Maintenance:
Reduces complexity by allowing generic function calls.
- What
is e-learning? Write any three advantages of e-learning. [2 + 3]
Ans:
E-Learning refers to the use of
electronic media, such as the internet, computers, and digital platforms, to
deliver educational content and facilitate learning. It enables students to
access courses, training, and resources remotely, without the need for
traditional classroom settings.
Types of E-Learning:
1. Synchronous: Real-time
classes with instructors and students interacting (e.g., live webinars).
2. Asynchronous: Pre-recorded
lessons and materials that learners can access at any time (e.g., MOOCs, video
tutorials).
3. Blended Learning: Combines
online learning with traditional face-to-face education.
Advantages of E-Learning:
a)
Flexibility to learn anytime, anywhere. Example:
A working professional, can take online courses whenever it fits her schedule,
whether day or night.
b)
Cost-effective, as it reduces the need for
physical infrastructure. Example: A company saves money by offering online
employee training instead of organizing physical classes with travel and room
costs.
c)
Access to a wide variety of resources and
expert instructors. Example: A person can take an online graphic design course
with top instructors from Skillshare, using video tutorials and project files.
- Explain
about waterfall model of SDLC.
[5]
Ans:
The Waterfall Model is a linear and sequential approach to software development, where each phase of the development process 1 must be completed before moving on to the next 2 one. It's like a waterfall, where the water flows steadily downwards through different stages.
Phases of the Waterfall Model:
1. Requirements Gathering and
Analysis: The project's goals, scope, and requirements are defined.
2. Design: The
system's architecture, components, and interfaces are designed.
3. Implementation (Coding): The
software is developed based on the design.
4. Testing: The
software is rigorously tested to identify and fix bugs.
5. Deployment: The
software is released to the end-users.
6. Maintenance: Ongoing
support and maintenance of the software.
Advantages (Pros):
a) Simple and easy to understand.
b) Provides a structured approach to
development.
c) Well-suited for projects with
well-defined requirements.
Disadvantages (Cons):
a) Inflexible: Difficult to
accommodate changes once development begins.
b) Time-consuming: Delays in one phase
can significantly impact the project timeline.
c) Limited customer involvement:
Customer feedback is primarily seen at the end of the project.
GROUP C
Long Answer Questions
[2×8=16]
- What
is computer network? Explain simplex, half duplex and full duplex mode of
communication. [2+6]
Feature |
Simplex |
Half Duplex |
Full Duplex |
Direction of Data |
One-way only. |
Two-way, but not at the same time. |
Two-way simultaneously. |
Example |
TV broadcasting. |
Walkie-talkies. |
Telephone calls. |
Advantages |
Simple and cost-effective. |
Allows two-way communication. |
Fast and efficient. |
Disadvantages |
No two-way communication. |
Slower than full duplex. |
Requires more complex hardware. |
Ans:
Computer network is a group of two or
more computers and devices connected to each other through wired or wireless
media to exchange data and information and share hardware, software and other
resources. Computer networks are classified as follows:
1) LAN (Local Area Network)
2) MAN (Metropolitan Area Network)
3) WAN (Wide Area Network)
Advantages of computer network are as
follows:
a)
Resource Sharing
b)
Data and File Sharing
c)
Communication and Collaboration
d)
Centralized Data Storage and Management
e)
Cost Efficiency
Mode of
communication refers to the way data is transmitted between devices in a
network or communication system. It determines the direction and timing of data
flow. There are three primary modes of communication as follows:
1)
Simplex: One-way communication where one device sends and the other
receives. Example: Radio broadcasting, where stations transmit to receivers
without direct communication.
2) Half
duplex: Two-way communication where devices can send and receive, but not
simultaneously. Example: Walkie-talkies, where users can talk and listen, but
not at the same time.
3) Full duplex: Two-way communication where devices can send and receive simultaneously. Example: Telephone calls, where both parties can speak and listen simultaneously.
Comparison of Simplex, Half Duplex, and Full Duplex:- Write
a C program to enter roll, name, school name and district of 15 students
and display the information in proper format using structure.
Ans:
#include <stdio.h>
#include <conio.h>
struct student
{
int roll;
char name[50];
char school[50];
char district[50];
};
void main()
{
struct student s[15];
int i;
clrscr();
for (i = 0; i < 15; i++)
{
printf("\nEnter details for student %d:\n", i + 1);
printf("Enter Roll Number: ");
scanf("%d", &s[i].roll);
printf("Enter Name: ");
scanf("%s", s[i].name);
printf("Enter School Name: ");
scanf("%s", s[i].school);
printf("Enter District: ");
scanf("%s", s[i].district);
}
printf("\nStudent
Information:\n");
printf("ROLL\tNAME\tSCHOOL\tDISTRICT\n");
for (i = 0; i < 15; i++)
{
printf("%d\t%s\t%s\t%s\n", s[i].roll, s[i].name, s[i].school,
s[i].district);
}
getch();
}
Example Output:
Enter details for student 1:
Enter Roll Number: 101
Enter Name: Madhav
Enter School Name: Usha
Enter District: Surkhet
Enter details for student 2:
Enter Roll Number: 102
Enter Name: Suman
Enter School Name: Sasa
Enter District: Pokhara
.........
Student Information:
ROLL
NAME SCHOOL
DISTRICT
101
Madhav Usha
Surkhet
102
Suman Sasa
Pokhara
........
OR
Explain call by value and call by reference. Write a C program to swap two
numbers using call by reference. [4+4]
Ans:
Call by Value:
Definition: A
method of passing arguments to a function where the actual value of the
argument is copied to the function's parameter.
Effect: Changes
made to the parameter within the function do not affect the original variable.
Usage: Suitable
for small or simple data types where modifying the original data is not
required.
Call by Reference:
Definition: A
method of passing arguments to a function where the reference (address) of the
argument is passed to the function's parameter.
Effect: Changes
made to the parameter within the function affect the original variable.
Usage: Suitable
for large or complex data types where modifying the original data is required.
A C program to swap two numbers using
call by reference is as follows:
#include <stdio.h>
#include <conio.h>
void swap(int *a, int *b);
// Function declaration
void main()
{
int a, b;
clrscr();
printf("Enter 1st
number:");
scanf("%d",
&a);
printf("Enter 2nd
number:");
scanf("%d",
&b);
swap(&a,
&b); // Call by reference
printf("\nValue of
1st number after swap: %d", a);
printf("\nValue of
2nd number after swap: %d", b);
getch();
}
void swap(int *a, int *b)
// Function definition
{
int temp;
temp = *a;
*a = *b;
*b = temp;
}
Example Output:
Enter 1st number: 5
Enter 2nd number: 10
Value of 1st number after swap: 10
Value of 2nd number after swap: 5
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home