Chap 1
Chap 1
PROGRAMMING FUNDAMENTAL
INTRODUCTORY
TO PROGRAMMING
CHAPTER 1
COURSE LEARNING OUTCOME (CLO) :
CLO1 (Apply knowledge of basic concepts and fundamentals of structured programming in solving a
variety of engineering and scientific problems using a high level programming language.
know the programming language
C Programming
Background of C Programming
3
know the programming language
Sample of C Program
• Basic C Program
4
know the programming language
Sample of C Program
• Output :
HELLO WORLD
5
The Basic Structure of a C Program
6
know the programming language
7
know the programming language
8
know the programming language
9
know the definition and types of programming
Defining Terms
Programme - A set of instructions that tells the
computer what to do
Programmer – A person who is involved in the
programming phases.
Programming language – is the language understood
by the computer, used to tell the computer what to do.
10
know the definition and types of programming
Machine languages
is a true computer language
machine specific instructions, consists of binary numbers Example : 0 and 1.
lowest level representation of computer program
Assembly languages
Using mnemonics to represent machine language instructions (translated via assemblers)
Example : mov ax, 1234h (mov value 1234h into register ax)
High-level languages
Codes similar to everyday English
Use mathematical notations (translated via compilers)
Example : grossPay = basePay + overTimePay
11
understand the types of programming and structure programming methodology
Types of Programming
Structured Programming
Functional / Modular Programming
Object Oriented Programming (OOP)
12
understand the types of programming and structure programming methodology
Types of Programming
Structured Programming
•Computer programming in which the
statements are organized in a specific manner to
minimize error or misinterpretation.
•Examples : ALGOL, Pascal, C, PL/I and Ada.
13
understand the types of programming and structure programming methodology
Types of Programming
Types of Programming
Algorithm
Flowchart
Steps in problem solving (logic)
using diagrams and specific
symbols.
17
Remember algorithm, flowchart and pseudocode
Pseudocode
• Steps in problem solving (logic) written using a combination of
spoken language and some programming language – semiformal.
Flowchart Sysmbol
TERMINAL
Start/Stop
Begin/ End
FLOWLINE
direction of the flow of control
PROCESS
instruction operation
DECISION
comparison operation
(use in Branching, Looping)
VONNECTOR
Connect one part of the flowchart
to another
INPUT/OUTPUT
reading & printing
19
20
Remember algorithm, flowchart and pseudocode
Advantages of Flowchart
21
Remember algorithm, flowchart and pseudocode
Disadvantages of Flowchart
22