Module 1: Fundamentals of Computing, Structured Programming Paradigm: Problem Solving
Approach, Algorithms and Flowcharts, Structure of C Program, Pre-Processor Directives Phases
of developing and running computer program in C. Data concepts in C: Tokens, Constants,
variables, expressions, Data types: size and values. Primitive Data Types, Type Modifiers,
Unsigned and Signed data types. Number systems and representations. Constants, Pointers:
Pointer variables. Declaring and dereferencing pointer variables. Input-Output Statements,
Formatted I/O, Operators: Operators and expressions, Types of operators, Precedence,
Associativity Pointer Arithmetic
Fundamentals of Computing:
Computers store and process numbers, letters and words that are referred to as Data.
Computers store numbers and perform operations in binary form.
The binary system is a numeric system that represents numeric values using only two
digits, 0 and 1, which are known as bits.
All decimal numbers that a user enters in a computer system is carried out in binary
numbers, then operations are performed on it.
Use of computers to solve problems and process data
Involves hardware, software, algorithms, and more
Hardware:
- CPU, RAM, Storage, Input/Output Devices
Software:
- System Software (OS, Driver Software, Utility Programs…etc),
- Application Software:
General-Purpose Applications (MS Office, Browser Software, …etc)
Special-Purpose Applications (Auto CAD, Tally, ….etc)
User-Defined Application Software (ERP, …etc)
Structured Programming Paradigm
Structured programming is a programming paradigm that aims to improve the clarity,
efficiency and maintainability of code by organizing it into well-defined structures.
It promotes a disciplined approach to programming by emphasizing the use of subroutines,
control structures, and modular design.
It organizes code in systematic way.
Prepared By Madhavi Karumudi
,Top Down Analysis
In Top Down Analysis we will Breaks down a problem or task into smaller, manageable
sub programs or modules
The analysis starts at a high level view and gradually drills down into finer details
It emphasizes decomposing a problem into smaller parts.
Each part is addressed individually before integrating them into a complete solution
Advantages:
Simplifies problem solving by breaking down into manageable units
Helps in organizing and structured code development
Code reusability
Reduces complexity
Modular Programming
Modular programming is a software development approach that emphasizes breaking a
program into self-contained, reusable modules.
It promotes code organization, maintainability, and reusability by encapsulating related
functionality within separate modules.
Advantages:
Code reusability
Improves maintainability
Reusability
Structured Code
Structured code in structured programming refers to well-organized and disciplined code.
It follows specific rules and principles to improve readability, maintainability, and
efficiency
Advantages:
Readability and Understandability
Maintainability and Debugging
Code Reusability and Modularity
Scalability and Extensibility
ALGORITHM:
An algorithm is a set of instructions that are followed to solve a problem or perform a task.
Definition: A finite sequence of instructions that are used to solve a specific problem or to perform
a computation.
Algorithm can be represented in many ways few are 1. Pseudo code representation 2. Graphical
representation (Flowchart)
PROPERTIES OF ALGORITHM
1. INPUT: The Algorithm should be given zero or more input.
2. OUTPUT: At least one quantity is produced for each input value.
3. DEFINITENESS: Each instruction is clear and unambiguous.
4. FINITENESS: If we trace out the instructions of an algorithm, then for all cases, the
algorithm terminates after a finite number of steps.
Prepared By Madhavi Karumudi
, 5. EFFECTIVENESS: Every instruction must very basic so that it can be carried out, in
principle, by a person using only pencil & paper.
Types of Algorithm Constructs:
1. Sequence:
Sequence Algorithm Work Flow
Example Algorithm:
Algorithm to calculate area of a circle
Step1 start
Step2 Input radius
Step3 calculate area
area 3.14*radius*radius
Step4 print area
Step5 stop
2. Selection (Decision Making):
Applicable when a problem has more than one outcome. The outcome is based on
the input.
Example: Greatest of two numbers, Check if the number is even or odd
Example: To print greatest of two numbers
Step 1 start
Step 2 input a and b
Step 3 if a is greater than b then
3.1 print a is greatest
else
3.2 print b is greatest
Step 4 stop
Prepared By Madhavi Karumudi
Approach, Algorithms and Flowcharts, Structure of C Program, Pre-Processor Directives Phases
of developing and running computer program in C. Data concepts in C: Tokens, Constants,
variables, expressions, Data types: size and values. Primitive Data Types, Type Modifiers,
Unsigned and Signed data types. Number systems and representations. Constants, Pointers:
Pointer variables. Declaring and dereferencing pointer variables. Input-Output Statements,
Formatted I/O, Operators: Operators and expressions, Types of operators, Precedence,
Associativity Pointer Arithmetic
Fundamentals of Computing:
Computers store and process numbers, letters and words that are referred to as Data.
Computers store numbers and perform operations in binary form.
The binary system is a numeric system that represents numeric values using only two
digits, 0 and 1, which are known as bits.
All decimal numbers that a user enters in a computer system is carried out in binary
numbers, then operations are performed on it.
Use of computers to solve problems and process data
Involves hardware, software, algorithms, and more
Hardware:
- CPU, RAM, Storage, Input/Output Devices
Software:
- System Software (OS, Driver Software, Utility Programs…etc),
- Application Software:
General-Purpose Applications (MS Office, Browser Software, …etc)
Special-Purpose Applications (Auto CAD, Tally, ….etc)
User-Defined Application Software (ERP, …etc)
Structured Programming Paradigm
Structured programming is a programming paradigm that aims to improve the clarity,
efficiency and maintainability of code by organizing it into well-defined structures.
It promotes a disciplined approach to programming by emphasizing the use of subroutines,
control structures, and modular design.
It organizes code in systematic way.
Prepared By Madhavi Karumudi
,Top Down Analysis
In Top Down Analysis we will Breaks down a problem or task into smaller, manageable
sub programs or modules
The analysis starts at a high level view and gradually drills down into finer details
It emphasizes decomposing a problem into smaller parts.
Each part is addressed individually before integrating them into a complete solution
Advantages:
Simplifies problem solving by breaking down into manageable units
Helps in organizing and structured code development
Code reusability
Reduces complexity
Modular Programming
Modular programming is a software development approach that emphasizes breaking a
program into self-contained, reusable modules.
It promotes code organization, maintainability, and reusability by encapsulating related
functionality within separate modules.
Advantages:
Code reusability
Improves maintainability
Reusability
Structured Code
Structured code in structured programming refers to well-organized and disciplined code.
It follows specific rules and principles to improve readability, maintainability, and
efficiency
Advantages:
Readability and Understandability
Maintainability and Debugging
Code Reusability and Modularity
Scalability and Extensibility
ALGORITHM:
An algorithm is a set of instructions that are followed to solve a problem or perform a task.
Definition: A finite sequence of instructions that are used to solve a specific problem or to perform
a computation.
Algorithm can be represented in many ways few are 1. Pseudo code representation 2. Graphical
representation (Flowchart)
PROPERTIES OF ALGORITHM
1. INPUT: The Algorithm should be given zero or more input.
2. OUTPUT: At least one quantity is produced for each input value.
3. DEFINITENESS: Each instruction is clear and unambiguous.
4. FINITENESS: If we trace out the instructions of an algorithm, then for all cases, the
algorithm terminates after a finite number of steps.
Prepared By Madhavi Karumudi
, 5. EFFECTIVENESS: Every instruction must very basic so that it can be carried out, in
principle, by a person using only pencil & paper.
Types of Algorithm Constructs:
1. Sequence:
Sequence Algorithm Work Flow
Example Algorithm:
Algorithm to calculate area of a circle
Step1 start
Step2 Input radius
Step3 calculate area
area 3.14*radius*radius
Step4 print area
Step5 stop
2. Selection (Decision Making):
Applicable when a problem has more than one outcome. The outcome is based on
the input.
Example: Greatest of two numbers, Check if the number is even or odd
Example: To print greatest of two numbers
Step 1 start
Step 2 input a and b
Step 3 if a is greater than b then
3.1 print a is greatest
else
3.2 print b is greatest
Step 4 stop
Prepared By Madhavi Karumudi