Computer All Sets Solutions

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 60

Set A

Multiple Choice Questions:


1. B
2. B
3. A
4. D
5. A
6. A
7. B
8. A
9. C
1. What is normalization. Explain its 1NF and 2NF with example.
Normalization is the process of organizing data in a database.
This includes creating tables and establishing relationships
between those tables according to rules designed both to protect
the data and to make the database more flexible by eliminating
redundancy and inconsistent dependency.
OR What do you mean by DDL explain with an example
Data Definition Language (DDL) is a standard for commands that
define the different structures in a database.
DDL statements create, modify, and remove database objects
such as tables, indexes, and users. Common DDL statements are
CREATE, ALTER, and DROP.
2. Write a program to check if a number is even or odd in
JavaScript.
<script>
const number = prompt("Enter a number: ");
if(number % 2 == 0) {
console.log("The number is even.");
}
else {
console.log("The number is odd.");
}
</script>
OR
Explain what you understand by client-side scripting language and
server-side scripting language.
3. Describe the different features of OOP
Abstraction
Data Abstraction is the property by virtue of which only the essential
details are displayed to the user. The trivial or the non-essentials units are
not displayed to the user. Data Abstraction may also be defined as the
process of identifying only the required characteristics of an object
ignoring the irrelevant details.
For example, when you login to your Amazon account online. You enter
your user_id and password and press login, what happens when you
press login, how the input data sent to amazon server, how it gets
verified is all abstracted away from you.
Encapsulation
The process of binding data and corresponding methods (behavior)
together into a single unit is called encapsulation. It is the mechanism
that binds together code and the data it manipulates. Another way to
think about encapsulation is, it is a protective shield that prevents the
data from being accessed by the code outside this shield.
Suppose you have an account in the bank. If your balance variable is
declared as a public variable in the bank software, your account balance
will be known as public, In this case, anyone can know your account
balance. So, they declare the balance variable as private for making your
account safe, so that anyone cannot see your account balance.
Inheritance
Inheritance is a way to reuse once written code again and again. The
class which is inherited is called the Base class & the class
which inherits is called the Derived class. They are also called parent and
child classes
For any bird, there are a set of predefined properties which are common
for all the birds and there are a set of properties which are specific for a
particular bird. Therefore, intuitively, we can say that all birds inherit
common features like wings, legs, eyes, etc. Therefore, in the object-
oriented way of representing the birds, we first declare a bird class with
a set of properties which are common to all the birds. By doing this, we
can avoid declaring these common properties in every bird which we
create. Instead, we can simply inherit the bird class in all the birds
which we create.
Polymorphism
Polymorphism comes from the Greek words “poly” and “morphism”.
“poly” means many and “morphism” means form i.e.. many forms.
Polymorphism means the ability to take more than one form. For
example, an operation has different behavior
in different instances. The behavior depends upon the type of the data
used in the operation
Let us look at the example of a car. A car has a gear transmission system.
It has four front gears and one backward gear. When the engine is
accelerated then depending upon which gear is engaged different
amounts of power and movement is delivered to the car. The action is
same applying gear but base don the type of gear the action behaves
differently or you can say that it shows many forms (polymorphism
means many forms)
4. What do you understand by waterfall model? Explain different stages
of Waterfall model.
The Waterfall Model was the first Process Model to be introduced.
It is also referred to as a linear-sequential life cycle model. It is
very simple to understand and use. In a waterfall model, each
phase must be completed before the next phase can begin and
there is no overlapping in the phases.

The sequential phases in Waterfall model are −


•Requirement Gathering and analysis − All possible
requirements of the system to be developed are captured in this
phase and documented in a requirement specification document.
•System Design − The requirement specifications from first
phase are studied in this phase and the system design is
prepared. This system design helps in specifying hardware and
system requirements and helps in defining the overall system
architecture.
•Implementation − With inputs from the system design, the
system is first developed in small programs called units, which
are integrated in the next phase. Each unit is developed and
tested for its functionality, which is referred to as Unit Testing.

•Integration and Testing − All the units developed in the


implementation phase are integrated into a system after testing of
each unit. Post integration the entire system is tested for any
faults and failures.

•Deployment of system − Once the functional and non-


functional testing is done; the product is deployed in the customer
environment or released into the market.

•Maintenance − There are some issues which come up in the


client environment. To fix those issues, patches are released. Also
to enhance the product some better versions are released.
Maintenance is done to deliver these changes in the customer
environment.
5. What do you mean by E-commerce, E-governance, E-medicine, E-
banking.
The term electronic commerce (ecommerce) refers to a business
model that allows companies and individuals to buy and sell goods and
services over the Internet. Ecommerce operates in four major market
segments and can be conducted over computers, tablets, smartphones,
and other smart devices. Nearly every imaginable product and service is
available through ecommerce transactions, including books, music,
plane tickets, and financial services such as stock investing and online
banking. As such, it is considered a very disruptive technology.
Electronic governance or e-governance is the application of
information technology for delivering government services,
exchange of information, communication transactions, integration
of various stand-alone systems between government to citizen
(G2C), government-to-business (G2B), government-to-
government (G2G), government-to-employees (G2E) as well as
back-office processes and interactions within the entire
governance framework. Through e-governance, government
services are made available to citizens through IT. The three main
target groups that can be distinguished in governance concepts
are government, citizens, and businesses/interest groups. In e-
governance, there are no distinct boundaries, finance and
support.
eMedicine is an online clinical medical knowledge base founded
in 1996 by Scott Plantz MD FAAEM, and Jonathan Adler MD MS
FACEP FAAEM, a computer engineer Jeffrey Berezin MS. The
fundamental concept was to create a large repository of
professional level medical content that could be both updated and
accessed continuously to assist in clinical care and physician
education.
E-banking is a blanket term used to indicate a process through which a
customer is allowed to carry out, personal or commercial banking
transactions using electronic and telecommunication network. It is a
product offered by banks which facilitates online banking, with the help
of which the customer can have access to the bank account in just one
click. E-banking covers facilities such as – fund transfer, checking
account statements, utility bill payments, opening of bank account,
locating nearest ATM, obtain information on financial products and
services, applying for loans, etc. using a personal computer,
smartphone, laptop or personal digital assistant.
Long Answer Questions
6. What are the different network topologies explain each with 2 merits
and 2 demerits?
Topology defines the structure of the network of how all the
components are interconnected to each other.
Bus Topology

•The bus topology is designed in such a way that all the stations are
connected through a single cable known as a backbone cable. Each node
is either connected to the backbone cable by drop cable or directly
connected to the backbone cable. When a node wants to send a
message over the network, it puts a message over the network. All the
stations available in the network will receive the message whether it has
been addressed or not.
Advantages of Bus topology:
•Low-cost cable: In bus topology, nodes are directly connected to the
cable without passing through a hub. Therefore, the initial cost of
installation is low.
•Moderate data speeds: Coaxial or twisted pair cables are mainly used
in bus-based networks that support upto 10 Mbps.
Disadvantages of Bus topology:
•Extensive cabling: A bus topology is quite simpler, but still it requires a
lot of cabling.
•Reconfiguration difficult: Adding new devices to the network would
slow down the network.
Ring Topology

•Ring topology is like a bus topology, but with connected ends. The
node that receives the message from the previous computer will
retransmit to the next node. The data flows in one direction, i.e., it is
unidirectional. The data flows in a single loop continuously known as an
endless loop.
Advantages of Ring topology:
•Network Management: Faulty devices can be removed from the
network without bringing the network down.
•Product availability: Many hardware and software tools for network
operation and monitoring are available.
Disadvantages of Ring topology:
•Difficult troubleshooting: It requires specialized test equipment to
determine the cable faults. If any fault occurs in the cable, then it
would disrupt the communication for all the nodes.
•Failure: The breakdown in one station leads to the failure of the overall
network.
Star Topology

•Star topology is an arrangement of the network in which every node is


connected to the central hub, switch or a central computer. The central
computer is known as a server, and the peripheral devices attached to
the server are known as clients. Coaxial cable or RJ-45 cables are used
to connect the computers. Hubs or Switches are mainly used as
connection devices in a physical star topology.
Advantages of Star topology
•Familiar technology: Star topology is a familiar technology as its tools
are cost-effective.
•Cost effective: Star topology networks are cost-effective as it uses
inexpensive coaxial cable.
Disadvantages of Star topology
•A Central point of failure: If the central hub or switch goes down, then
all the connected nodes will not be able to communicate with each
other.
•Cable: Sometimes cable routing becomes difficult when a significant
amount of routing is required.
Mesh topology

•Mesh technology is an arrangement of the network in which


computers are interconnected with each other through various
redundant connections. There are multiple paths from one computer to
another computer. It does not contain the switch, hub or any central
computer which acts as a central point of communication. The Internet
is an example of the mesh topology.
Advantages of Mesh topology:
Reliable: The mesh topology networks are very reliable as if any link
breakdown will not affect the communication between connected
computers.
Fast Communication: Communication is very fast between the nodes.
Disadvantages of Mesh topology
•Cost: A mesh topology contains a large number of connected devices
such as a router and more transmission media than other topologies.
•Efficiency: In this topology, redundant connections are high that
reduces the efficiency of the network.
Hybrid Topology

•The combination of various different topologies is known as Hybrid


topology. A Hybrid topology is a connection between different links and
nodes to transfer the data. When two or more different topologies are
combined together is termed as Hybrid topology and if similar
topologies are connected with each other will not result in Hybrid
topology. For example, if there exist a ring topology in one branch of
ICICI bank and bus topology in another branch of ICICI bank, connecting
these two topologies will result in Hybrid topology.
Advantages of Hybrid Topology
•Reliable: If a fault occurs in any part of the network will not affect the
functioning of the rest of the network.
•Scalable: Size of the network can be easily expanded by adding new
devices without affecting the functionality of the existing network.
Disadvantages of Hybrid topology
•Complex design: The major drawback of the Hybrid topology is the
design of the Hybrid network. It is very difficult to design the
architecture of the Hybrid network.
•Costly Hub: The Hubs used in the Hybrid topology are very expensive
as these hubs are different from usual Hubs used in other topologies.
7. Write a program that reads name, roll_no, marks and address of 20
students using structure and display them.
#include<stdio.h>
struct student{
char name[30],address[30];
int roll;
float marks;
};
int main()
{
struct student s[20];
int i;
for(i=0;i<20;i++){
printf("Enter name, adress, roll and marks of student %d:\n",i+1);
scanf("%s%s%d%f",s[i].name, s[i].address, &s[i].roll,
&s[i].marks);
}
printf("Inputted details are:\n");
for(i=0;i<20;i++){
printf("Details of Student#%d\n",i+1);
printf("Name: %s\n",s[i].name);
printf("Address: %s\n",s[i].address);
printf("Roll: %d\n", s[i].roll);
printf("Marks: %f\n\n", s[i].marks);
}
return 0;
}
Set 2
MCQs
1. D
2. B
3. D
4. B
5. b
6. C
7. 53
8. C
9. D

Group B (5*5=25)
1. Differentiate between centralize and Distributed with example.
OR
Who is DBA? Explain his/her roles and responsibilities.
A Database Administrator (DBA) is individual or person responsible for
controlling, maintenance, coordinating, and operation of database
management system. Managing, securing, and taking care of database
system is prime responsibility.
Role and Duties of Database Administrator (DBA) :
•Decides hardware –
They decides economical hardware, based upon cost, performance and
efficiency of hardware, and best suits organization. It is hardware which
is interface between end users and database.
•Manages data integrity and security –
Data integrity need to be checked and managed accurately as it
protects and restricts data from unauthorized use. DBA eyes on
relationship within data to maintain data integrity.
•Database design –
DBA is held responsible and accountable for logical, physical design,
external model design, and integrity and security control.
•Database implementation –
DBA implements DBMS and checks database loading at time of its
implementation.
•Query processing performance –
DBA enhances query processing by improving their speed, performance
and accuracy.
•Tuning Database Performance –
If user is not able to get data speedily and accurately then it may loss
organization business. So by tuning SQL commands DBA can enhance
performance of database.
2. Differentiate between client-server and peer-to-peer architecture.

3. Define form validation. Write example of basic form validation.


Form validation is a “technical process where a web-form checks if the
information provided by a user is correct.” The form will either alert the
user that they messed up and need to fix something to proceed, or the
form will be validated and the user will be able to continue with their
registration process. For example, Twitter won’t let me use an email
address that is incorrectly formatted, and gives me an error message
when I try to do so
function validateForm() {
let x = document.forms["myForm"]["fname"].value;
if (x == "") {
alert("Name must be filled out");
return false;
}
}
OR
Write program to illustrate any two methods of adding JavaScript in
HTML document.
1. Embedding code:-
To add the JavaScript code into the HTML pages, we can use
the <script>.....</script> tag of the HTML that wrap around JavaScript
code inside the HTML program.
Example
<!DOCTYPE html >
<html>
<head>
<title> page title</title>
<script>
document.write("Welcome to Javatpoint");
</script>
</head>
<body>
<p>Inthis example we saw how to add JavaScript in the head section </
p>
</body>
</html>
2. Inline code:-
Generally, this method is used when we have to call a function in the
HTML event attributes.
Let's look at the example.
<!DOCTYPE html >
<html>
<head>
<title> page title</title>
</head>
<body>
<p>
<a href="#" onClick="alert('Welcome !');">Click Me</a>
</p>
<p> in this example we saw how to use inline JavaScript or directly in an
HTML tag. </p>
</body>
</html>
4. Differentiate between procedural and object oriented programming.
5. Define IOT and Big data with its advantage.
The internet of things, or IoT, is a system of interrelated
computing devices, mechanical and digital machines, objects,
animals or people that are provided with unique identifiers (UIDs)
and the ability to transfer data over a network without requiring
human-to-human or human-to-computer interaction.
Some of the advantages of IoT include the following:
•ability to access information from anywhere at any time on any
device;
•improved communication between connected electronic devices;
•transferring data packets over a connected network saving time
and money; and
•automating tasks helping to improve the quality of a business's
services and reducing the need for human intervention.
Big data refers to data sets that are too large or complex to be
dealt with by traditional data-processing application software.
Data with many fields (rows) offer greater statistical power, while
data with higher complexity (more attributes or columns) may
lead to a higher false discovery rate
Benefits or advantages of Big Data
➨It helps in improving science and research.
➨It improves healthcare and public health with availability of
record of patients.
➨Every second additions are made.
➨One platform carry unlimited information.
Group C (8*2=16)
6. WAP to enter roll_no, name, age of 20 students and count students
with age > 20 and <25
OR
What do you understand by pointers? Write a program to read and
write from and to a file using any file handling functions.
A pointer is a variable that stores the address of another variable. Unlike other
variables that hold values of a certain type, pointer holds the address of a variable.
For example, an integer variable holds (or you can say stores) an integer value,
however an integer pointer holds the address of a integer variable.
#include <stdio.h>
#include <conio.h>
#include <string.h>
int main()
{
FILE *fp;
char s[50];
fp = fopen( "data-1.txt","w" );
printf( " Enter Lines of Text : \n" );
gets( s );
while( strlen(s) > 0 )
{
fputs( s, fp );
fputs( "\n", fp );
gets( s );
}
fclose( fp );
fp = fopen( "data-1.txt","r" );
printf( " Entered Text : \n" );
fgets( s, 49, fp );
while( !feof( fp ) ){
printf( "%s", s );
fgets( s, 49, fp );
}
fclose( fp );
getch();
return 0;
}
7. What is computer network? Write its advantage. What are the
different modes of communication? What are the types of network on
the basis of architecture?
A computer network is a set of computers sharing resources
located on or provided by network nodes. The computers use
common communication protocols over digital interconnections to
communicate with each other. These interconnections are made
up of telecommunication network technologies, based on
physically wired, optical, and wireless radio-frequency methods
that may be arranged in a variety of network topologies.
Advantages of Network:
These are the main advantages of Computer Networks:
1.Central Storage of Data –
Files can be stored on a central node (the file server) that can be shared
and made available to each and every user in an organization.
2.Anyone can connect to a computer network –
There is a negligible range of abilities required to connect to a modern
computer network. The effortlessness of joining makes it workable for
even youthful kids to start exploiting the data.
3.Faster Problem-solving –
Since an extensive procedure is disintegrated into a few littler
procedures and each is taken care of by all the associated gadgets, an
explicit issue can be settled in lesser time.
4.It is highly flexible –
This innovation is known to be truly adaptable, as it offers clients the
chance to investigate everything about fundamental things, for
example, programming without influencing their usefulness.
There are three modes of transmission, namely: simplex, half-duplex,
and full-duplex.
Simplex
In simplex transmission mode, the communication between sender
and receiver occurs in only one direction. The sender can only send
the data, and the receiver can only receive the data. The receiver
cannot reply to the sender.
Simplex transmission can be thought of as a one-way road in which
the traffic travels only in one direction—no vehicle coming from the
opposite direction is allowed to drive through.
To take a keyboard/monitor relationship as an example, the keyboard
can only send the input to the monitor, and the monitor can only
receive the input and display it on the screen. The monitor cannot
reply, or send any feedback, to the keyboard.

Half Duplex
The communication between sender and receiver occurs in both
directions in half-duplex transmission, but only one at a time. The
sender and receiver can both send and receive the information, but
only one is allowed to send at any given time. Half-duplex is still
considered a one-way road, in which a vehicle travelling in the
opposite direction of the traffic has to wait till the road is empty
before it can pass through.
For example, in walkie-talkies, the speakers at both ends can speak,
but they have to speak one by one. They cannot speak
simultaneously.

Full Duplex
In full-duplex transmission mode, the communication between
sender and receiver can occur simultaneously. The sender and
receiver can both transmit and receive at the same time. The full-
duplex transmission mode is like a two-way road, in which traffic can
flow in both directions at the same time.
For example, in a telephone conversation, two people communicate,
and both are free to speak and listen at the same time.
Computer Network Architecture is defined as the physical and logical
design of the software, hardware, protocols, and media of the
transmission of data
The two types of widely used network architectures are peer-to-
peer aka P2P and client/server aka tiered.
Peer-to-Peer Architecture
In a peer-to-peer network, tasks are allocated to every device on the
network. Furthermore, there is no real hierarchy in this network, all
computers are considered equal and all have the same abilities to use
the resources available on this network. Instead of having a central
server which would act as the shared drive, each computer thats
connected to this network would act as the server for the files stored on
it.

Client/Server Architecture
Client-server architecture, architecture of a computer network in which many
clients (remote processors) request and receive service from a centralized server
(host computer). In a client/server network, a centralized, really powerful
computer(server) acts as a hub in which other computers or
workstations(clients) can connect to. This server is the heart of the system,
which manages and provides resources to any client that requests them.
Set 3
MCQs
1. A
2. A
3. B
4. A
5. D
6. C
7. B
8. B
9. D
Short Answer Questions (5 * 5=25)
1. Explain 1NF and 2NF with an example. Or Demonstrate basic DDL
statements with example.
See Set 1 Solution
2. Write a Program to generate Multiplication table using JavaScript.
<script>
const number = parseInt(prompt('Enter an integer: '));
for(let i = 1; i <= 10; i++) {
const result = i * number;
console.log(`${number} * ${i} = ${result}`);
}
</script>
Or
Write a Program to find whether given number palindrome is using
JavaScript
<script>
function Palindrome()
{
var rem, temp, final = 0;
var number = Number(document.getElementById("N").value);

temp = number;
while(number>0)
{
rem = number%10;
number = parseInt(number/10);
final = final*10+rem;
}
if(final==temp)
{
console.log("The inputed number is Palindrome");
}
else
{
console.log("The inputted number is not palindrome");
}
}
</script>
3. Differentiate between Procedural Oriented Programming and Object
Oriented Programming
See set 2 solutions
4. What are the different types of Implementation Method in SDLC?
Explain.
The four methods of implementation are:
• Parallel Conversion
• Direct Cutover Conversion
• Pilot Approach
• Phase-In Method
Parallel Conversion
When the new system is used at the same time as the old system
the two systems are said to be running in parallel.

Advantages:
Users can compare the output of the old system with the output of
the new system, to ensure correctness
There is little risk of data loss because the known-good system is
running

Disadvantages:
Users must take more time to enter data into two different
systems
Data could be different in two different systems if there is
intensive data entry.

Example:
A medical system that tracks patient heart rates is being replaced.
A new system is attached while the old system is still working.
The two systems are used in parallel to ensure the new system
produces the exact same data as the old system.
Direct
When a new system is implemented without any phased or pilot
implementation, it is said to be direct. The old system is retired,
and the new system goes live.
Advantages:
If the system is not critical, this can be a good method for
implementation
Disadvantages:
If you are not sure the system will work, this method of
implementation may not be a good idea
Example:
A store is implementing a new electronic system for employees to
leave suggestions for improvement. There is no existing system.
The store uses direct method because they are very sure the new
system will work, there is a low cost if the system fails, and the
store wants to make a "big splash" with the new system.
Pilot
When a small group of users within an organization uses a new
system prior to wider use, the system is said to be piloted.
Advantages:
Training can be supported by pilot group
Failure or problems can be identified and addressed without wide-
spread impact to the organization
Disadvantages:
In a pilot, issues of scale can cause problems. For example, the
system might work well for 10 users, but not for 1000.
Example:
A bakery is implementing a new system for customers to order
online. They choose 50 customers and ask them to try the new
system, and provide feedback. The bakery can can then identify
issues and address them prior to implementing systems for
thousands of users.
Phased
When small parts of the new system gradually replace small parts
of the old system, the implementation method is said to be
phased.

Advantages:

Training can be completed in small parts


A failure of the new system has minimal impact because it is only
one small part
Issues around scale can be addressed without major impact.
Disadvantages:

This implementation method takes more time to get the new


system fully online than other methods.
There is a possibility of data loss if part of the new system fails.
Example:

A school has a new system to manage student athletics. The old


system is paper and pencil. Slowly, over time, a new system is
introduced to manage students, their teams, seasons, and their
coaches. At first, the new system simply manages teams. Then
the new system manages seasons (and school years), slowly, the
new system is increased to manage coaches, players and finally
events. At the end of implementation, the new system is
managing everything related to student athletics and the old
paper and pencil system isn't being used any longer.
5.Describe the concept of robotics and Cloud computing.
Robotics is the engineering and operation of machines
that can autonomously or semi-autonomously perform
physical tasks on behalf of a human. Typically robots
perform tasks that are either highly repetitive or too
dangerous for a human to carry out safely. Mechanical
robots use sensors, actuators and data processing to
interact with the physical world. Someone who makes
their living in robotics must have a strong background in
mechanical engineering, electrical engineering and
computer programming. In recent years, the field of
robotics has begun to overlap with machine learning and
artificial intelligence. To help avoid confusion, the word
bot is no longer being used to describe a physical robot.
Instead, it's used to describe a software robot that does
not have a mechanical body.
Cloud computing is the delivery of different services through the
Internet. These resources include tools and applications like data
storage, servers, databases, networking, and software. Rather than
keeping files on a proprietary hard drive or local storage device, cloud-
based storage makes it possible to save them to a remote database. As
long as an electronic device has access to the web, it has access to the
data and the software programs to run it. Cloud computing is a popular
option for people and businesses for a number of reasons including cost
savings, increased productivity, speed and efficiency, performance, and
security.
Long Questions (8 * 2=16)
1.What is communication system? Explain all its components with
necessary diagram.
The communication system is a system which describes the
information exchange between two points. The process of
transmission and reception of information is called
communication. The major elements of communication are
the Transmitter of information, Channel or medium of
communication and the Receiver of information. A collection of
elements (devices) which works together to establish a
communication between the sender and receiver is called a
communication system. Some examples of communication
system include radio broadcasting, television broadcasting, radio
telegraphy, mobile communication, computer communication
etc. Two or more people communicating with each other by using
sound signals is also known as the communication system.
The basic components of a communication system are information
source, input transducer, transmitter, communication channel,
receiver, output transducer, and destination.
Information Source
As we know that the communication system establishes the
communication bridge between the sender (transmitter) and
receiver. To establish this communication bridge between the
sender and receiver, first, we need an information to send. This
information originates in the information source.
Input Transducer
If you want to talk (communicate) with your friend who is sitting
beside you, then you can directly talk with him by using voice
signals (sound signals). But if the same friend is farther away
from you, then you can’t directly communicate with him by using
voice signals (sound signals) because sound signals cannot
travel larger distances. So in order to overcome this problem and
transmit information to larger distances, first we need to convert
this sound signal into another form of signal (electrical signal or
light signal) which travel larger distances. The device which is
used to convert this sound signal into another form of signal is
called transducer.
Transmitter
The transmitter is a device which converts the signal produced by
the source into a form that is suitable for transmission over a
given channel or medium. Transmitters use a technique called
modulation to convert the electrical signal into a form that is
suitable for transmission over a given channel or medium.
Modulation is the main function of a transmitter.
Communication Channel
The communication channel is a medium through which the
signal travels. Or The communication channel is a wired or
wireless medium through which the signal (information) travels
from source (transmitter) to destination (receiver).
Noise
Noise is an unwanted signal that enters the communication
system via the communication channel and interferes with the
transmitted signal. The noise signal (unwanted signal) degrades
the transmitted signal (signal containing information).
Receiver
The receiver is a device that receives the signal (electrical signal)
from the channel and converts the signal (electrical signal) back
to its original form (light and sound) which is understandable by
humans at the destination. TV set is a good example of a
receiver. TV set receives the signals sent by the TV transmitting
stations and converts the signal into a form which is easily
understandable by the humans who are watching TV.
Output Transducer
The transducer that is present at the output side of the
communication system is called output transducer. Generally, the
output transducer converts the electrical signal into a non-
electrical signal (sound signal, light signal, or both sound and light
signal). The best example of an output transducer is the
loudspeaker which is placed between the receiver section and the
destination. The loudspeaker converts the electrical signals into
sound signals which are easily understandable by the humans at
the destination.
Destination
The destination is the final stage in the communication system.
Generally, humans at some place are considered as the
destination. A destination is a place where humans consume the
information. For example, if you are watching TV, you are
considered as the destination.
2.Write a program using structure to read marks of n number of
students having fields id, name, email, & roll no, store them and sort
them according to name in ascending order.
#include<stdio.h>
#include<string.h>
struct stud
{
char name[50], email[50];
int id, roll;
};
int main()
{
struct stud s[100], t;
int i=0,j=0,n;
printf("How many student records you want to enter?");
scanf("%d",&n);
for(i=0;i<n;i++){
printf("\nEnter Student-%d Details",i+1);
printf("\n--------------------------\n");
printf("Enter Name : ");
scanf("%s",&s[i].name);
printf("Email : ");
scanf("%s",&s[i].email);
printf("Enter ID : ");
scanf("%d",&s[i].id);
printf("roll number: ");
scanf("%d",&s[i].roll);
}
for(i=0;i<n;i++){
for(j=i+1;j<n;j++){
if(strcmp(s[i].name,s[j].name)>0){
t=s[i];
s[i]=s[j];
s[j]=t;
}
}
}
printf("\n\tData after rearrangement");
printf("\n-----------------------------------\n");
printf("Student Name\tEmail\t\tID\tRoll no\n");
printf("----------------------------------\n");
for(i=0;i<n;i++){
printf("\n%s\t\t%s\t\t%d\t\t%d\n",s[i].name,s[i].email,s[i].id,s[i].roll);
}
return 0;
}

OR
Write a program to read salary of 50 employees and count how many
employees getting salary between 25000 to 30000.
#include<stdio.h>
#include<string.h>
struct emp
{
char name[50];
float salary;
};
int main()
{
struct emp e[100];
for (int i=0;i<5;i++){
printf("Enter Name:");
scanf("%s",&e[i].name);
printf("Enter Salary");
scanf("%f",&e[i].salary);
}
int c=0;
for (int i=0;i<5;i++){
if(e[i].salary>25000&&e[i].salary<30000)
{
c=c+1;
}
}
printf("Number of employees who are getting salary between 25000
and 30000 are %d", c);
}
Set 4
MCQs
1. B
2. C
3. A
4. C
5. D
6. D
7. D
8. D
9. A
Short Answer Questions (5 * 5=25)
1. What is data model? Explain the types of data model in brief.
Data models define how the logical structure of a database is
modeled. Data Models are fundamental entities to introduce
abstraction in a DBMS. Data models define how data is
connected to each other and how they are processed and stored
inside the system. These are the types of data model:
Entity-Relationship Model
Entity-Relationship (ER) Model is based on the notion of real-
world entities and relationships among them. While formulating
real-world scenario into the database model, the ER Model
creates entity set, relationship set, general attributes and
constraints.
ER Model is best used for the conceptual design of a database.
ER Model is based on −
•Entities and their attributes.
•Relationships among entities.
Relational Model
The most popular data model in DBMS is the Relational Model. It
is more scientific a model than others. This model is based on
first-order predicate logic and defines a table as an n-ary
relation.
The main highlights of this model are −
•Data is stored in tables called relations.
•Relations can be normalized.
•In normalized relations, values saved are atomic values.
•Each row in a relation contains a unique value.
•Each column in a relation contains values from a same domain.
OR
Write down 10 differences between centralized and distributed
database
2. Write a program using javascript to find the factors of a number
<script>
const num = prompt('Enter a number: ');
console.log(`The factors of ${num} is:`);
for(let i = 1; i <= num; i++) {
if(num % i == 0) {
console.log(i);
}
}
</script>

OR
Write a javascript program using function to find the multiplication
table of a number
See set 3 solutions
3. What is oop? Define Abstraction and polymorphism in oop in brief.
See set 1 solutions
4. What is SDLC? Explain the phases of SDLC in brief.
SDLC is a process followed for a software project, within a
software organization. It consists of a detailed plan describing
how to develop, maintain, replace and alter or enhance specific
software. The life cycle defines a methodology for improving the
quality of software and the overall development process.
The stages of SDLC are as follows:
Stage1: Planning and requirement analysis
Requirement Analysis is the most important and necessary stage in
SDLC. The senior members of the team perform it with inputs from all
the stakeholders and domain experts or SMEs in the industry. Planning
for the quality assurance requirements and identifications of the risks
associated with the projects is also done at this stage. Business analyst
and Project organizer set up a meeting with the client to gather all the
data like what the customer wants to build, who will be the end user,
what is the objective of the product. Before creating a product, a core
understanding or knowledge of the product is very necessary.
Stage2: Defining Requirements
Once the requirement analysis is done, the next stage is to certainly
represent and document the software requirements and get them
accepted from the project stakeholders. This is accomplished through
"SRS"- Software Requirement Specification document which contains
all the product requirements to be constructed and developed during
the project life cycle.
Stage3: Designing the Software
The next phase is about to bring down all the knowledge of
requirements, analysis, and design of the software project. This phase
is the product of the last two, like inputs from the customer and
requirement gathering.
Stage4: Developing the project
In this phase of SDLC, the actual development begins, and the
programming is built. The implementation of design begins concerning
writing code. Developers have to follow the coding guidelines described
by their management and programming tools like compilers,
interpreters, debuggers, etc. are used to develop and implement the
code.
Stage5: Testing
After the code is generated, it is tested against the requirements to
make sure that the products are solving the needs addressed and
gathered during the requirements stage. During this stage, unit testing,
integration testing, system testing, acceptance testing are done.
Stage6: Deployment
Once the software is certified, and no bugs or errors are stated, then it
is deployed. Then based on the assessment, the software may be
released as it is or with suggested enhancement in the object segment.
After the software is deployed, then its maintenance begins.
Stage7: Maintenance
Once when the client starts using the developed systems, then the real
issues come up and requirements to be solved from time to time.
This procedure where the care is taken for the developed product is
known as maintenance.
5. Explain Artificial Intelligence and Robotics in Brief.
Artificial intelligence (AI) refers to the simulation of human intelligence
in machines that are programmed to think like humans and mimic their
actions. The term may also be applied to any machine that exhibits
traits associated with a human mind such as learning and problem-
solving. The ideal characteristic of artificial intelligence is its ability to
rationalize and take actions that have the best chance of achieving a
specific goal. A subset of artificial intelligence is machine learning, which
refers to the concept that computer programs can automatically learn
from and adapt to new data without being assisted by humans. Deep
learning techniques enable this automatic learning through the
absorption of huge amounts of unstructured data such as text, images,
or video.
Robotics is the engineering and operation of machines
that can autonomously or semi-autonomously perform
physical tasks on behalf of a human. Typically robots
perform tasks that are either highly repetitive or too
dangerous for a human to carry out safely. Mechanical
robots use sensors, actuators and data processing to
interact with the physical world. Someone who makes
their living in robotics must have a strong background in
mechanical engineering, electrical engineering and
computer programming. In recent years, the field of
robotics has begun to overlap with machine learning and
artificial intelligence. To help avoid confusion, the word
bot is no longer being used to describe a physical robot.
Instead, it's used to describe a software robot that does
not have a mechanical body.
Group C: Long Answer Questions (8 * 2=16)
1. What is an Ip address? Explain Class A, Class B, Class C, Class D and
Class E Ip address in brief.
An IP address is a unique address that identifies a device on the
internet or a local network. IP stands for "Internet Protocol," which is
the set of rules governing the format of data sent via the internet or
local network.
Classful addressing method divides the IP address into five separate
classes based on four address bits.
Here, classes A, B, C offers addresses for networks of three distinct
network sizes. Class D is only used for multicast, and class E reserved
exclusively for experimental purposes.
Class A Network
This IP address class is used when there are a large number of hosts.
In a Class A type of network, the first 8 bits (also called the first octet)
identify the network, and the remaining have 24 bits for the host into
that network. An example of a Class A address is 102.168.212.226.
Here, “102” helps you identify the network and 168.212.226 identify
the host. Class A addresses 127.0.0.0 to 127.255.255.255 cannot be
used and is reserved for loopback and diagnostic functions.
Class B Network
In a B class IP address, the binary addresses start with 10. In this IP
address, the class decimal number that can be between 128 to 191.
The number 127 is reserved for loopback, which is used for internal
testing on the local machine. The first 16 bits (known as two octets)
help you identify the network. The other remaining 16 bits indicate
the host within the network.
An example of Class B IP address is 168.212.226.204, where *168 212*
identifies the network and *226.204* helps you identify the Hut
network host.
Class C Network
Class C is a type of IP address that is used for the small network. In
this class, three octets are used to indent the network. This IP ranges
between 192 to 223.
In this type of network addressing method, the first two bits are set to
be 1, and the third bit is set to 0, which makes the first 24 bits of the
address them and the remaining bit as the host address. Mostly local
area network used Class C IP address to connect with the network.
Example for a Class C IP address:
192.168.178.1
Class D Network
Class D addresses are only used for multicasting applications. Class D
is never used for regular networking operations. This class addresses
the first three bits set to “1” and their fourth bit set to use for “0”.
Class D addresses are 32-bit network addresses. All the values within
the range are used to identify multicast groups uniquely.
Therefore, there is no requirement to extract the host address from
the IP address, so Class D does not have any subnet mask.
Example for a Class D IP address:
227.21.6.173
Class E Network
Class E IP address is defined by including the starting four network
address bits as 1, which allows you two to incorporate addresses from
240.0.0.0 to 255.255.255.255. However, E class is reserved, and its
usage is never defined. Therefore, many network implementations
discard these addresses as undefined or illegal.
Example for a Class E IP address:
243.164.89.28
2. Write down a program using structure to accept details of n number
of students having field’s id, name, age, address, roll no, email, store
them and sort them according to name.
See set 3 Solutions
Or
Write a program to find the transpose of 2 matrixes in 2-D array.
#include <stdio.h>
int main() {
int a[10][10], transpose[10][10], r, c;
printf("Enter rows and columns: ");
scanf("%d %d", &r, &c);
printf("\nEnter matrix elements:\n");
for (int i = 0; i < r; ++i)
for (int j = 0; j < c; ++j) {
printf("Enter element a%d%d: ", i + 1, j + 1);
scanf("%d", &a[i][j]);
}
printf("\nEntered matrix: \n");
for (int i = 0; i < r; ++i)
for (int j = 0; j < c; ++j) {
printf("%d ", a[i][j]);
if (j == c - 1)
printf("\n");
}
for (int i = 0; i < r; ++i)
for (int j = 0; j < c; ++j) {
transpose[j][i] = a[i][j];
}
printf("\nTranspose of the matrix:\n");
for (int i = 0; i < c; ++i)
for (int j = 0; j < r; ++j) {
printf("%d ", transpose[i][j]);
if (j == r - 1)
printf("\n");
}
return 0;
}
Set 5
MCQs
1. A
2. B
3. C
4. C
5. C
6. C
7. D
8. A
9. A
Short Answer Questions (5 * 5=25)
1. What is normalization? Explain 2NF and 3 NF with examples.
See set 1 solutions
Third Normal Form (3NF)
A relation is in Third Normal Form (3NF) if –
1.it is in 2NF and,
2.it has no transitive-dependency
for all the non-key attributes.If A->B and B-> C are two functional
dependencies, then A->C is a transitive dependency.
If a table has such indirect dependencies, then it does not follow
the Third Normal Form
Primary Key: Employee ID
Non-key attributes: Employee Name, Employee State,Employee
Country, Employee ZIP
1.‘Employee ZIP’ is dependent on ‘Employee ID.’
2.Employee State’ and ‘Employee Country’ aredependent on ‘Employee
ZIP.’
Thus by the definition of transitive dependency, ‘EmployeeState’ and
‘Employee Country’ depend on ‘Employee ID.’
This table is, therefore, not in 3NF.
We need to break downthe table into two, and the final conversion looks
like this -
Table 1:

Table 2:
OR
Explain the ddl and dml statements in brief with its syntax.
For DDL see set 1 solutions
Data Manipulation Language (DML) commands in SQL deals
with manipulation of data records stored within the database
tables. It does not deal with changes to database objects and its
structure. The commonly known DML commands are INSERT,
UPDATE and DELETE. Liberally speaking, we can consider even
SELECT statement as a part of DML commands. Albeit, it strictly
forms part of the Data Query Language (DQL) command.
Following are the four main DML commands in SQL:
SELECT DML Command
SELECT is the most important data manipulation command in
Structured Query Language. The SELECT command shows the records
of the specified table. It also shows the particular record of a particular
column by using the WHERE clause.
Syntax of SELECT DML command
SELECT * FROM table_name;
INSERT DML Command
INSERT is another most important data manipulation command in
Structured Query Language, which allows users to insert data in
database tables.
Syntax of INSERT Command
INSERT INTO Student (Stu_id, Stu_Name, Stu_Marks, Stu_Age) VALUES (
104, Anmol, 89, 19);
UPDATE DML Command
UPDATE is another most important data manipulation command in
Structured Query Language, which allows users to update or modify the
existing data in database tables.
Syntax of UPDATE Command
UPDATE Product SET Product_Price = 80 WHERE Product_Id = 'P102' ;
DELETE DML Command
DELETE is a DML command which allows SQL users to remove single or
multiple existing records from the database tables.
Syntax of DELETE Command
DELETE FROM Table_Name WHERE condition;
2. Write a program using javascript to find the area of a rectangle
<script>
var l, w, a;
l = 8;
w = 6;
a = l * w;
document.write("Area of rectangle = " + a + " units");
</script>
OR
Write a javascript program using function to find the factorial of a
number.
<script>
function factorial(n){
if(n == 0 || n == 1){
return 1;}
else{
return n * factorial(n-1);
}
}
let n = 4;
answer = factorial(n)
console.log("The factorial of " + n + " is " + answer);
</script>
3. What is oop? Explain Inheritance and Encapsulation with examples.
See set 3 solutions
Inheritance is a way to reuse once written code again and again.The class
which is inherited is called the Base class & the class which inherits is
called the Derived class. They are also called parent and child classes.So
when a derived class inherits a base class, the derived classcan use all
the functions which are defined in base class, hencemaking code
reusable.For any bird, there are a set of predefined properties which are
common for all the birds and there are a set of properties whichare
specific for a particular bird. Therefore, intuitively, we cansay that all
birds inherit common features like wings, legs, eyes,etc. Therefore, in
the object-oriented way of representing thebirds, we first declare a bird
class with a set of properties which are common to all the birds. By
doing this, we can avoid declaring these common properties in every
bird which wecreate. Instead, we can simply inheritthe bird class in all
the birds which we create.
The process of binding data and corresponding methods(behavior)
together into a single unit is called encapsulation. Iti s the mechanism
that binds together code and the data it manipulates. Another way to
think about encapsulation is,it is a protective shield that prevents the
data from being accessed by the code outside this shield.
Looking at the example of a power steering mechanism of a car. Power steering of a
car is a complex system, which internally have lots of components tightly coupled
together, they work synchronously to turn the car in the desired direction. It even
controls the power delivered by the engine to the steering wheel. But to the external
world there is only one interface is available and rest of the complexity is hidden.
Moreover, the steering unit in itself is complete and independent. It does not affect
the functioning of any other mechanism.
Similarly, same concept of encapsulation can be applied to code.
4. What is agile methodology? Explain the types of feasibility study.
The meaning of Agile is swift or versatile. "Agile process model“
refers to a software development approach based on iterative
development. Agile methods break tasks into smaller iterations, or
parts do not directly involve long term planning.The projects cope
and requirements are laid down at the beginning of the
development process. Plans regarding the number of iterations,
the duration and the scope of each iterationare clearly defined in
advance.
Types of Feasibility Study
1. Technical Feasibility
This assessment focuses on the technical resources available to
the organization. It helps organizations determine whether the
technical resources meet capacity and whether the technical
team is capable of converting the ideas into working systems.
Technical feasibility also involves the evaluation of the hardware,
software, and other technical requirements of the proposed
system. As an exaggerated example, an organization wouldn’t
want to try to put Star Trek’s transporters in their building—
currently, this project is not technically feasible.
2. Economic Feasibility
This assessment typically involves a cost/ benefits analysis of
the project, helping organizations determine the viability, cost,
and benefits associated with a project before financial resources
are allocated. It also serves as an independent project
assessment and enhances project credibility—helping decision-
makers determine the positive economic benefits to the
organization that the proposed project will provide.
3. Operational Feasibility
This assessment involves undertaking a study to analyze and
determine whether—and how well—the organization’s needs can
be met by completing the project. Operational feasibility studies
also examine how a project plan satisfies the requirements
identified in the requirements analysis phase of system
development.
4. Scheduling Feasibility
This assessment is the most important for project success; after
all, a project will fail if not completed on time. In scheduling
feasibility, an organization estimates how much time the project
will take to complete.
5. Explain Cloud computing and IOT
For cloud computing see set 3 solutions
The internet of things, or IoT, is a system of interrelated
computing devices, mechanical and digital machines, objects,
animals or people that are provided with unique identifiers (UIDs)
and the ability to transfer data over a network without requiring
human-to-human or human-to-computer interaction.
A thing in the internet of things can be a person with a heart
monitor implant, a farm animal with a biochip transponder, an
automobile that has built-in sensors to alert the driver when tire
pressure is low or any other natural or man-made object that can
be assigned an Internet Protocol (IP) address and is able to
transfer data over a network.
Increasingly, organizations in a variety of industries are using IoT
to operate more efficiently, better understand customers to deliver
enhanced customer service, improve decision-making and
increase the value of the business.
Group C: Long Answer Questions (8 * 2=16)
3. What is transmission media? Explain the types of transmission
media in brief.
In data communication terminology, a transmission medium is a
physical path between the transmitter and the receiver i.e. it is the
channel through which data is sent from one place to another.
1. Guided Media:
It is also referred to as Wired or Bounded transmission media. Signals
being transmitted are directed and confined in a narrow pathway by
using physical links.
Features:
•High Speed
•Secure
•Used for comparatively shorter distances
There are 3 major types of Guided Media:
(i) Twisted Pair Cable –
It consists of 2 separately insulated conductor wires wound about each
other. Generally, several such pairs are bundled together in a protective
sheath. They are the most widely used Transmission Media.
Twisted Pair is of two types:
•Unshielded Twisted Pair (UTP):
UTP consists of two insulated copper wires twisted around one another.
This type of cable has the ability to block interference and does not
depend on a physical shield for this purpose. It is used for telephonic
applications.
•Shielded Twisted Pair (STP):
This type of cable consists of a special jacket (a copper braid covering or
a foil shield) to block external interference. It is used in fast-data-rate
Ethernet and in voice and data channels of telephone lines.
(ii) Coaxial Cable –
It has an outer plastic covering containing an insulation layer made of
PVC or Teflon and 2 parallel conductors each having a separate
insulated protection cover. The coaxial cable transmits information in
two modes: Baseband mode(dedicated cable bandwidth) and
Broadband mode(cable bandwidth is split into separate ranges). Cable
TVs and analog television networks widely use Coaxial cables.
(iii) Optical Fiber Cable –
It uses the concept of reflection of light through a core made up of
glass or plastic. The core is surrounded by a less dense glass or plastic
covering called the cladding. It is used for the transmission of large
volumes of data.
The cable can be unidirectional or bidirectional. The WDM (Wavelength
Division Multiplexer) supports two modes, namely unidirectional and
bidirectional mode.
2. Unguided Media:
It is also referred to as Wireless or Unbounded transmission media. No
physical medium is required for the transmission of electromagnetic
signals.
Features:
•The signal is broadcasted through air
•Less Secure
•Used for larger distances
There are 3 types of Signals transmitted through unguided media:
(i) Radio waves –
These are easy to generate and can penetrate through buildings. The
sending and receiving antennas need not be aligned. Frequency
Range:3KHz – 1GHz. AM and FM radios and cordless phones use Radio
waves for transmission.
(ii) Microwaves –
It is a line of sight transmission i.e. the sending and receiving antennas
need to be properly aligned with each other. The distance covered by
the signal is directly proportional to the height of the antenna.
Frequency Range:1GHz – 300GHz. These are majorly used for mobile
phone communication and television distribution.
(iii) Infrared –
Infrared waves are used for very short distance communication. They
cannot penetrate through obstacles. This prevents interference
between systems. Frequency Range:300GHz – 400THz. It is used in TV
remotes, wireless mouse, keyboard, printer, etc.

4. Write down a program using structure to accept details of n number


of students having field’s id, name, age, address, roll no, email, store
them and sort them according to age in ascending order.
See set 3 solutions
Or
Write a program to find the addition of 2 matrixes in 2-D array.
#include <stdio.h>
int main() {
int r, c, a[100][100], b[100][100], sum[100][100], i, j;
printf("Enter the number of rows (between 1 and 100): ");
scanf("%d", &r);
printf("Enter the number of columns (between 1 and 100): ");
scanf("%d", &c);

printf("\nEnter elements of 1st matrix:\n");


for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
printf("Enter element a%d%d: ", i + 1, j + 1);
scanf("%d", &a[i][j]);
}
printf("Enter elements of 2nd matrix:\n");
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
printf("Enter element b%d%d: ", i + 1, j + 1);
scanf("%d", &b[i][j]);
}

// adding two matrices


for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
sum[i][j] = a[i][j] + b[i][j];
}

// printing the result


printf("\nSum of two matrices: \n");
for (i = 0; i < r; ++i)
for (j = 0; j < c; ++j) {
printf("%d ", sum[i][j]);
if (j == c - 1) {
printf("\n\n");
}
}

return 0;
}

You might also like