I have answered the questions from all the previous files related to Hardware, Software, and
Networking. This final set of questions covers Problem Solving: Program Analysis and
Design.
Here are the answers to the questions from files [Link] and [Link].
C. VERY SHORT - TYPE QUESTIONS (Algorithm &
Flowchart)
1. What is an Algorithm?
An algorithm is a finite set of well-defined instructions or a step-by-step procedure for
solving a specific problem or accomplishing a specific task.
2. How can we compare between two algorithms written for the same
problem?
Algorithms are typically compared based on their efficiency, which is measured in terms of:
1. Time Complexity: The amount of time an algorithm takes to run as the input size grows.
2. Space Complexity: The amount of memory/storage an algorithm uses as the input size
grows.
3. What is a flowchart?
A flowchart is a diagrammatic representation of an algorithm, process, or workflow. It uses
standard graphical symbols to illustrate the sequence of steps and the flow of control. ***
4. How do you create a flowchart for an algorithm?
To create a flowchart for an algorithm, you represent each step of the algorithm (input,
processing, decision, output) with a specific symbol and connect these symbols using
directional lines (flow lines) to show the exact sequence of execution.
5. What are some common symbols used in flowcharts?
Common flowchart symbols include:
● Oval (Terminal): Used for Start/End points.
● Parallelogram: Used for Input/Output operations.
● Rectangle: Used for Processing or calculation steps.
● Diamond (Decision): Used for Conditional checks (Yes/No or True/False).
● Arrow lines: Used to show the flow of control.
6. Can you explain what a decision symbol is in the context of
flowcharts?
A decision symbol (represented by a diamond \diamond) is used to indicate a point where a
question is asked or a condition is checked (e.g., Is X > 10?). It always has one entry point
and two exit paths, typically labeled "Yes" (True) and "No" (False), to show alternative flows.
7. When would you use a start/end symbol in your flowchart?
The Start/End symbol (oval) is used exactly at the beginning of the flowchart to indicate the
start of the program execution and at the end of the flowchart to indicate the termination of the
program. Every flowchart must have one Start and at least one End symbol.
8. Why should we avoid using more than one connector at a time?
You should avoid using more than one flow line (connector) coming out of a non-decision
symbol (like a process box) because it would introduce ambiguity. A single process step should
lead to only one next logical step, ensuring the flow is clear and deterministic. (Note: The
decision symbol is the exception, as it requires two exit lines).
9. What's the difference between a sequence and selection structure?
Feature Sequence Structure Selection (Conditional)
Structure
Flow Steps are executed one after The program chooses which
the other in strict order. block of code to execute based
on a condition.
Logic Simple, linear execution. Decision-making logic (if/else,
switch).
Flowchart Linear path, only process and Uses the Diamond (Decision)
I/O symbols. symbol.
10. Write down types of control structure.
The three fundamental types of control structures used in programming are:
1. Sequence: Linear execution of steps.
2. Selection (or Conditional): Executes one block of code based on a condition.
3. Iteration (or Looping): Repeats a block of code multiple times.
D. SHORT - TYPE QUESTIONS (Program Analysis and
Design)
1. What is an algorithm? What is the need for an algorithm?
An algorithm is a detailed, step-by-step set of instructions to solve a particular problem.
The need for an algorithm is:
● Clarity and Planning: It provides a clear blueprint for the programmer, breaking down a
complex problem into manageable steps.
● Analysis: It allows for the analysis of the solution's efficiency (time and space complexity)
before implementation.
● Language Independence: It defines the logic that can then be translated into any
programming language.
2. What are two advantages of creating a flowchart to represent our
process or program?
Two advantages of creating a flowchart are:
1. Communication: Flowcharts are visual representations that are easy to understand,
making it simple for developers and non-technical people to grasp the program's logic.
2. Debugging and Analysis: They help in systematic debugging and analysis by visually
showing the flow of control, making it easier to trace errors and inefficiencies.
3. What is structured programming?
Structured programming is a programming paradigm based on the use of the three
fundamental control structures: sequence, selection, and iteration. It aims to improve clarity,
quality, and development time by avoiding the use of the confusing and unrestricted GOTO
statement.
4. Difference between top down and bottom up approach.
Feature Top-Down Approach Bottom-Up Approach
Starting Point Starts with the main Starts with designing the
problem/high-level design smallest modules/low-level
and breaks it down into smaller functions and integrates them
modules. into a larger system.
Design Flow Hierarchical; proceeds from Proceeds from specific to
general to specific. general.
Use Case Used in Structured Used in Object-Oriented
Programming and overall Programming (OOP), and
system design. often for testing integrated
modules.
5. Write down characteristics of good programming.
Characteristics of good programming include:
● Clarity and Readability: Code is easy for others (and your future self) to understand,
using meaningful variable names and proper comments.
● Efficiency: The program uses optimal algorithms that minimize execution time and
memory usage.
● Correctness and Reliability: The program runs without bugs and handles unexpected
inputs gracefully.
● Maintainability: The code is well-structured (modular) and easy to update or modify.
6. What is problem analysis?
Problem analysis is the first and most crucial step in program development. It involves fully
understanding and defining the problem that needs to be solved. This step determines the:
● Input: The data required to start the process.
● Process: The calculations or logic needed.
● Output: The desired result or solution.
7. Difference between pseudo code and algorithm.
Feature Algorithm Pseudo Code
Definition The conceptual, step-by-step An informal, high-level
procedure to solve a problem. description of the algorithm's
structure.
Format Can be written in simple Written in a format that closely
English, mathematical notation, resembles actual programming
or flowcharts. language structure, but without
strict syntax rules.
Purpose To define the logic and the To bridge the gap between the
steps. algorithm's general concept
and the final program code.
8. What do you mean by program development?
Program development is the comprehensive process of creating and maintaining a software
application. It typically involves several sequential phases:
1. Problem Analysis/Definition
2. Program Design (Algorithm/Flowchart/Pseudocode)
3. Coding (Writing the actual program)
4. Testing and Debugging
5. Documentation
6. Implementation and Maintenance
9. Write down any 2 symbol used for flowchart.
Two symbols used for a flowchart are:
1. Oval (Terminal): Represents the Start or End of the program.
2. Rectangle (Process): Represents a processing step or calculation (e.g., X = Y + 5).
10. What do you mean by program design.
Program design is the phase in the program development life cycle where the detailed logic
and structure of the program are planned out. This involves:
● Designing the algorithm for the solution.
● Representing the logic using tools like flowcharts and pseudocode.
● Determining the data structures and overall modular structure of the program.