0% found this document useful (0 votes)
1 views12 pages

Algorithms and Flowcharts

The document covers algorithms and flowcharts, explaining their definitions, characteristics, and uses. It includes fill-in-the-blank questions, true/false statements, multiple choice questions, and application-based questions related to operating systems and graphical user interfaces. Additionally, it provides algorithms for specific tasks and discusses various types of operating systems.

Uploaded by

Ashok Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views12 pages

Algorithms and Flowcharts

The document covers algorithms and flowcharts, explaining their definitions, characteristics, and uses. It includes fill-in-the-blank questions, true/false statements, multiple choice questions, and application-based questions related to operating systems and graphical user interfaces. Additionally, it provides algorithms for specific tasks and discusses various types of operating systems.

Uploaded by

Ashok Garg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

Algorithms and Flowcharts

Fill in the blanks

Question 1

The step-by-step procedure to solve any problem is called Algorithm.

Question 2

Flowcharts are the pictorial representation of a program.

Question 3

The process of drawing a flowchart for an algorithm is known as Flowcharting.

Question 4

An algorithm should involve Finite number of steps to reach a solution.

Question 5

The Decision box is used for checking or applying any condition in the program.

State True or False


Question 1

A flowchart is not a pictorial representation of steps to get the solution of a problem.


False

Question 2

Algorithm means a set of rules which specify how to solve a specific problem.
True

Question 3

Flowcharts are helpful in analyzing the logic of problems.


True

Question 4

Connectors are used to connect the boxes.


False

Question 5

The general direction of flow in any flowchart is from bottom to top or from right to left.
True

Multiple Choice Questions


Question 1

In a flowchart, .......... indicate the sequence of steps and the direction of flow.

1. Flow lines ✓
2. Decision box
3. Processing box

Question 2

.......... is used to accept input and give output of a program.

1. Flow lines
2. Input/Output box ✓
3. Decision box

Question 3

The .......... represents the starting or ending point of a program.

1. Decision box
2. Flow lines
3. Start /Stop box ✓

Question 4

.......... connectors are used to join the parts of a flowchart contained within the same page.

1. On Page ✓
2. Off Page
3. None of these

Answer the following

Question 1

What is an algorithm? Write any three characteristics of an algorithm.

Answer

The step-by-step procedure to solve any logical and mathematical problem is called an Algorithm. Three characteristics
of an algorithm are:

1. Input — An algorithm accepts an input.


2. Generality — An algorithm works in a set of inputs.
3. Definiteness — Each instruction should be written in a simple and precise manner so that everyone can
understand it.

Question 2

Define the term flowchart. Write any two advantages of a flowchart.


Answer

A flowchart is a pictorial representation of the steps or an algorithm used to solve a particular problem. Two advantages
of a flowchart are:

1. Communication — The pictorial representation of the flowchart provides better communication. It is easier for
the programmer to explain the logic of a program.
2. Effective Analysis — It is a very useful technique, as flowchart is a pictorial representation that helps the
programmer to analyze the problem in detail.

Question 3

What is the use of input/output box?

Answer

It is used for accepting inputs or giving output of the program.

Question 4

When do we use the Process box?

Answer

It is used for writing the processing instructions and doing calculations.

Question 5

What is the use of Decision box?

Answer

It is used for checking or applying any condition in the program.

Write algorithms for the following problems


Question 1

To polish your shoes.

Algorithm

Step 1: Start
Step 2: Open the shoe polish
Step 3: Put shoe polish on brush
Step 4: Polish one shoe
Step 5: Put shoe polish on brush
Step 6: Polish the other shoe
Step 7: Close the shoe polish
Step 8: Stop

Question 2

To input three sides of a triangle and print if it is scalene, isosceles or equilateral.


Algorithm

Step 1: Start
Step 2: Read three sides of triangle and store them in a, b, c.
Step 3: Check if a == b and b == c
Step 4: If true, print "Equilateral Triangle" and goto step 8
Step 5: Check if a == b or b == c or c == a
Step 6: If true, print "Isosceles Triangle" and goto step 8
Step 7: Print "Scalene Triangle"
Step 8: Stop

Make flowcharts for the following statements

Question 1
Accept the age of a person. Display the message Eligible For Role if the age is equal to or greater
than 18, otherwise display the message Not Eligible.
Flowchart

Question 2
Input a name. If name is Kabir, then accept marks. If marks are >= 85, then display Good
Performance else display Pass.
Flowchart
Question 3
Accept one character. Display the message Vowel if the entered character is a vowel, otherwise
display the message Not a Vowel.
Flowchart
Question 4
Input a year. Display the message Leap year if the entered year has 366 days, otherwise display the message Not a leap year.

Flowchart

Chapter 1
Operating System and Graphical User Interface - Role
and Functions
Fill in the blanks

Question 1

Hardware refers to the physical parts of a computer that you can see and touch.

Question 2

Software refers to the instructions or programs, that tell the hardware what to do.

Question 3
Application software is a set of programs designed to perform specific type of job.

Question 4

Distributed operating system runs on computers which are located in different geographical areas, interconnected
through a network.

Question 5

A Command line is a space on the display screen in which commands are typed in by the user.

State True or False

Question 1

Computers work with an interaction of hardware and software.


True

Question 2

Application software is a collection of one or more programs that controls and manages the overall operation and
performance of a computer system.
False

Question 3

Operating System acts as a central coordinator between the user and the software.
False

Question 4

Multi-threading operating system allows more than one user to use the same computer at the same time or at different
times.
True

Question 5

CUI requires the user to type commands in order to interact with the computer system.
True

Multiple Choice Questions

Question 1

A computer interprets the instructions given by a user with the help of an

1. Operating System ✓
2. Device Driver
3. Utility Software

Question 2
The ability to perform more than one task together at one time is called

1. Multi-programming
2. Multi-tasking ✓
3. Multi-threading

Question 3

.......... has the capability to prioritise the processes, minimise the execution time and work independently with no
interdependencies.

1. RTOS ✓
2. PTOS
3. LTOS

Question 4

Character User Interface is also known as .......... Interface.

1. Single User
2. Command Line ✓
3. Multi User

Question 5

.......... requires more RAM to run

1. GUI ✓
2. CUI
3. CLI

Application Based Questions

Question 1

While conducting a lecture on the types of operating system, Mohit's instructor asked him to name an opearting system
that is used when the time span required to react to an input is rigid and time bound. Can you help Mohit in answering
the question?

Answer

RTOS (Real Time Operating System)

Question 2

In a quiz competition, the quiz master asked one of the participants, Nyra, "In which user interface, the user mostly gets
immediate visual feedback of the action he performs?" To this Nyra replied "CUI". Is she right? If not, what is the right
answer?

Answer

Nyra is wrong. Correct answer is GUI (Graphical User Interface)


Answer the following

Question 1

Define hardware and software.

Answer

Hardware refers to the physical parts of the computer that we can see and touch. Software refers to the instructions or
programs that tell the hardware what to do.

Question 2

What is a System software? Into how many categories can it be classified?

Answer

System software is a collection of one or more programs that controls and manages the overall operation and
performance of a computer system. It can be classified into the following categories: Operating System, Language
Processors, Device Drivers, and Utility Software.

Question 3

Explain why we need an Operating system.

Answer

Operating system acts as the central coordinator between hardware and software. It fills the communication gap
between the hardware and the user. An operating system encompasses all operations such as What to do?, When to do?,
How to do? For example, when a button is pressed on a hardware, this information is passed to the operating system
which takes care of the final outcome by handling What to do?, When to do? and How to do it?

Question 4

Explain any two functions of an Operating system.

Answer

Two functions of an Operating system are:

1. Processor Management — The OS (Operating System) ensures that each process/application receives enough
time from the processor to function properly. It also tries to utilize as many processor cycles as possible for the
real time work.
2. Memory Storage and Management — The OS (Operating System) manages the sharing of internal memory
among the multiple applications. It also ensures that one process should not consume the memory allocated to
another process. An OS has to make efficient utilisation of different types of memory (RAM, Cache, etc.) within
the system, so as to ensure proper execution of every process.

Question 5

What are the advantages of GUI over CUI?

Answer

GUI (Graphical User Interface) CUI (Character User Interface)


GUI interface is much attractive and appealing. CUI interface is relatively less appealing.

GUI is easier to learn and more user-friendly due to the CUI is a text based interface and hence is not as user friendly
presence of various graphical elements like icons, menu, as GUI.
buttons, etc.

With GUI, a user does not have to learn complicated A user is required to memorize many commands to operate
commands. and control a CUI.

GUI users have Windows that allow a user to work, view, CUI does not offer the same ease and ability to work with
control, and manipulate multiple programs and folders at multiple programs at once on one screen.
the same time.

GUI supports the use of both a mouse and keyboard to CUI supports the use of a keyboard only.
control and navigate through your system.

In GUI, the user mostly gets immediate visual feedback In CUI, there is no obvious feedback. If we consider the same
of the action he is doing. For example, the user can see example, one or more additional commands will have to be
immediately that a file is successfully moved from one issued to confirm the file transfer action.
directory to another.

In GUI multiple tasks can run simultaneously at a time. Only one task can be executed at a particular point of time in
CUI.

Question 6

Write short notes on the following:

i. Multi-user operating system

Answer

Multi-user operating system allows more than one user to use the same computer at the same time or at different times.
Some Operating Systems, which fall in this category are: Windows 2000, Windows NT, Windows XP, Windows Vista,
Windows 7, Windows 8, Windows 8.1, Linux, Unix. Windows 2000 was the first version of Windows, which allowed
creation of several user accounts on a single machine.

ii. Multi-threading operating system

Answer

These operating systems allow different parts of a software program to run simultaneously. The feature of multi-
threading can delay the execution response of certain processes. For example, if a Game server is hosted on LAN, then
all players connecting to that server will utilise different parts of the same game at the same time. All resources will be
utilised from the server machine, which can be a performance degrading factor. The common examples of such
operating systems are: Windows NT/2000, Windows XP, Windows 7, Windows 8, Windows 8.1, Unix, Linux, etc.

iii. Real time operating system

Answer

RTOS (Real time operating system) is designed to handle real life scenarios and problems. Such operating systems have
the capability to prioritise the processes, minimise execution time, and work independently with no interdependencies.
Real time operating system is used when the time span required to react to an input is rigid and time bound. Even a
microsecond of delay will cause the system to fail. Examples are: Air traffic control, Robots, Weapon systems, and
Industrial control systems.
There are two types of Real Time Operating Systems:

1. Hard Real-time systems — These systems guarantee that critical tasks are completed in time.
2. Soft Real-time systems — These systems are less restrictive. Examples are: Undersea exploration, Planetary rovers, and
Virtual reality.

iv. Distributed operating system

Answer

Distributed operating system runs on a set of computers that are located in different geographical areas, interconnected
by a network. It controls these interconnected systems and makes them appear as a single computer. It allows all the
linked machines to access data and software, and the process takes over the common network from different computers,
irrespective of their location on the globe.

You might also like