SlideShare a Scribd company logo
Introduction to
Computer
Programming
ENGR. EARL EDRENE G. DILLA, CCpE
Instructor I
Computer program
- is a list of instructions that the computer
machine follows to properly accept input,
correctly process them and present the results
in the most understandable way.
Computer Programming
– is considered to be an art and at the same time a science. It is an art because
there is no standard way to interpret a problem and solve it using a standard form of
programming procedures and styles. It is fast becoming a science because standard
programming practice is starting to be adopted.
Programs fall into two major classes:
application programs and operating
systems. An application program is
one that carries out some function directly
for a user, such as word processing or
game-playing. An operating system is a
program that manages the computer and
the various resources and devices
connected to it, such as RAM (random
access memory), hard drives, monitors,
keyboards, printers, and modems, so that
they may be used by other programs.
A programmer uses another type of program
called a text editor to write the new program
in a special notation called a programming
language. With the text editor, the
programmer creates a text file, which is an
ordered list of instructions, also called the
program source file. The individual instructions
that make up the program source file are
called source code. At this point, a special
applications program translates the
source code into machine language , or
object code — a format that the operating
system will recognize as a proper program and
be able to execute.
Three types of applications programs
translate from source code to object
code: compilers, interpreters, and
assemblers. The three operate differently
and on different types of programming
languages, but they serve the same
purpose of translating from a
programming language into machine
language. A compiler translates text
files written in a high-level programming
language—such as Fortran, C, or Pascal—
from the source code to the object code
all at once
Computer is composed of:
1.CPU (Central Processing Unit) – this
is where all mathematical and logical
forms of processing are done on data.
2.Memory – before a computer can do
any productive work such as
programming, it has to remember things
such as data it needs to produce
information.
3. Input and Output Device – data
have to come into the computer by first
entering them through input devices.
Ex. Keyboard. After the computer
executes a program to process data
and produce information, this
information remains in the memory.
Part of the program has to show these
results to the outside world. Output
devices such as monitor screen and
printers are used to display the results
to the user.
4. Software – computers today come
bundled with some software already
installed in them.
Operating System – performs for the
programmer many tasks that used to
be very difficult to program
Two forms of Memory
• Internal memory (RAM-Random
•
Access Memory) – stores programs and
data that are executed and processed by
the computer.
Secondary memory – supplements RAM
so those computers are able to
permanently save programs and data that
are not yet needed for execution and
processing. Ex. Floppy disk, hard disk &
etc.
The following are standard Operating
System functions.
every time
•Validating user identification
the user uses the
computer
•Provides standard functions like
editor, compilers and linkers
•Manages files of the user by
providing functions like Copy,
Delete, Append
The following are standard Operating
System functions.
•Retrieves data out of data files
•Manages memory for the user by
determining where in the memory a
program is to be loaded every time it is
called to run
•Makes communication between the CPU,
Memory and input/output devices
transparent to the user or the user are
unaware of these things while they are at
work.
High level languages
– are programming languages that
are closer to human language than
to machine language. They are
characterized to use common
English words as their instructions.
Aside from that, high level
languages have the following
characteristics:
High level languages
• Requires additional step of compilation or
translation so that from high-level, another
program that has exactly the same meaning
and intended results in low-level or machine
language can be generated and loaded into
the computer and executed.
•A compiled program is usually not as
efficient as when the program was originally
written in machine language or assembly.
This is due to the fact that compilers add a
lot of extra overheads in terms of memory
and non-optimized logical translations.
Each of these programming languages
was designed to solve particular kinds
of problems.
• COBOL – Common Business Oriented Language was
designed to solve business problems like accounting.
• FORTRAN – Formula Translation is a high level
language used for scientific and engineering
applications.
• Pascal and C – are general-purpose language. They
are high-level language but they can be embedded
with assembly language code effectively making these
languages middle-level languages. C language is
responsible in the implementation f major software
including operating systems, compilers and software
development tools.
programs perform three basic
operations:
• get the input from the keyboard
• process the input data
• display the results on the screen
INPUT DATA
PROCESS DATA
DISPLAY ALL RESULTS
The most basic form of a C
program
follows a very simple format:
pre-processor
directives
main function
{
declarations
statements
FirstExam
ple
/*Converts weight in pounds to kilograms*/
#include <stdio.h>
#define kg_in_pound .454
int main()
{float pounds, kilograms; /*declare both weights as float data type*/
printf(“Enter weight in pounds :”)
scanf(“%f”,&pounds);
kilograms = kg_in_pound * pounds;
printf(“5.2f Pounds is equal %.2f kilograms,n”, pounds, kilograms);
getch();
return(0);
}
- END -

More Related Content

Similar to introductiontocomputerprogramming.pptx

Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
Software Concepts Notes
Software Concepts NotesSoftware Concepts Notes
Software Concepts Notes
Prof. Dr. K. Adisesha
 
L2 ch1
L2  ch1L2  ch1
L2 ch1
Taqsim Rajon
 
Vskills c developer sample material
Vskills c developer sample materialVskills c developer sample material
Vskills c developer sample material
Vskills
 
Vskills c++ developer sample material
Vskills c++ developer sample materialVskills c++ developer sample material
Vskills c++ developer sample material
Vskills
 
Software
SoftwareSoftware
Software
Kalsoom shoukat
 
C program full materials.pdf
C program  full materials.pdfC program  full materials.pdf
C program full materials.pdf
RSathyaPriyaCSEKIOT
 
Computer system
Computer systemComputer system
Computer system
Fery Anugra
 
Introduction to Computer Softwares
Introduction to Computer SoftwaresIntroduction to Computer Softwares
Introduction to Computer Softwares
Naresh Dubey
 
computer Unit 6
computer Unit 6computer Unit 6
computer Unit 6
Aqeel Rehman
 
Interaction With Computers FIT
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FIT
Raj vardhan
 
Chapter 1 - Prog101.ppt
Chapter 1 - Prog101.pptChapter 1 - Prog101.ppt
Chapter 1 - Prog101.ppt
JosephObadiahTuray
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
Hepsijeba
 
C PROGRAMING AND PC
C PROGRAMING AND PCC PROGRAMING AND PC
C PROGRAMING AND PC
4044uday
 
c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)
Acad
 
Computer_Programming_Fundamentals in cpp
Computer_Programming_Fundamentals in cppComputer_Programming_Fundamentals in cpp
Computer_Programming_Fundamentals in cpp
meharikiros2
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating system
sonykhan3
 
system software and application software, compiler, interpreter & assembler
system software  and application software, compiler, interpreter & assemblersystem software  and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
chetan birla
 
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdfAERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
ssuserb3a23b
 

Similar to introductiontocomputerprogramming.pptx (20)

Computer and programing basics.pptx
Computer and programing basics.pptxComputer and programing basics.pptx
Computer and programing basics.pptx
 
Software Concepts Notes
Software Concepts NotesSoftware Concepts Notes
Software Concepts Notes
 
L2 ch1
L2  ch1L2  ch1
L2 ch1
 
Richa garg itm
Richa garg itmRicha garg itm
Richa garg itm
 
Vskills c developer sample material
Vskills c developer sample materialVskills c developer sample material
Vskills c developer sample material
 
Vskills c++ developer sample material
Vskills c++ developer sample materialVskills c++ developer sample material
Vskills c++ developer sample material
 
Software
SoftwareSoftware
Software
 
C program full materials.pdf
C program  full materials.pdfC program  full materials.pdf
C program full materials.pdf
 
Computer system
Computer systemComputer system
Computer system
 
Introduction to Computer Softwares
Introduction to Computer SoftwaresIntroduction to Computer Softwares
Introduction to Computer Softwares
 
computer Unit 6
computer Unit 6computer Unit 6
computer Unit 6
 
Interaction With Computers FIT
Interaction With Computers FITInteraction With Computers FIT
Interaction With Computers FIT
 
Chapter 1 - Prog101.ppt
Chapter 1 - Prog101.pptChapter 1 - Prog101.ppt
Chapter 1 - Prog101.ppt
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
 
C PROGRAMING AND PC
C PROGRAMING AND PCC PROGRAMING AND PC
C PROGRAMING AND PC
 
c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)c and data structures first unit notes (jntuh syllabus)
c and data structures first unit notes (jntuh syllabus)
 
Computer_Programming_Fundamentals in cpp
Computer_Programming_Fundamentals in cppComputer_Programming_Fundamentals in cpp
Computer_Programming_Fundamentals in cpp
 
Computer software and operating system
Computer software and operating systemComputer software and operating system
Computer software and operating system
 
system software and application software, compiler, interpreter & assembler
system software  and application software, compiler, interpreter & assemblersystem software  and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
 
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdfAERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
AERO_PROGRAMMING_FOR_PROBLEM_SOLVING_LECTURE_NOTES.pdf
 

Recently uploaded

power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
ViniHema
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
ssuser9bd3ba
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
PrashantGoswami42
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
Kamal Acharya
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
Kamal Acharya
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
Intella Parts
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
Kamal Acharya
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 

Recently uploaded (20)

power quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptxpower quality voltage fluctuation UNIT - I.pptx
power quality voltage fluctuation UNIT - I.pptx
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
LIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.pptLIGA(E)11111111111111111111111111111111111111111.ppt
LIGA(E)11111111111111111111111111111111111111111.ppt
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.Quality defects in TMT Bars, Possible causes and Potential Solutions.
Quality defects in TMT Bars, Possible causes and Potential Solutions.
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Event Management System Vb Net Project Report.pdf
Event Management System Vb Net  Project Report.pdfEvent Management System Vb Net  Project Report.pdf
Event Management System Vb Net Project Report.pdf
 
Automobile Management System Project Report.pdf
Automobile Management System Project Report.pdfAutomobile Management System Project Report.pdf
Automobile Management System Project Report.pdf
 
Forklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella PartsForklift Classes Overview by Intella Parts
Forklift Classes Overview by Intella Parts
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfCOLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 

introductiontocomputerprogramming.pptx

  • 1. Introduction to Computer Programming ENGR. EARL EDRENE G. DILLA, CCpE Instructor I
  • 2. Computer program - is a list of instructions that the computer machine follows to properly accept input, correctly process them and present the results in the most understandable way. Computer Programming – is considered to be an art and at the same time a science. It is an art because there is no standard way to interpret a problem and solve it using a standard form of programming procedures and styles. It is fast becoming a science because standard programming practice is starting to be adopted.
  • 3. Programs fall into two major classes: application programs and operating systems. An application program is one that carries out some function directly for a user, such as word processing or game-playing. An operating system is a program that manages the computer and the various resources and devices connected to it, such as RAM (random access memory), hard drives, monitors, keyboards, printers, and modems, so that they may be used by other programs.
  • 4. A programmer uses another type of program called a text editor to write the new program in a special notation called a programming language. With the text editor, the programmer creates a text file, which is an ordered list of instructions, also called the program source file. The individual instructions that make up the program source file are called source code. At this point, a special applications program translates the source code into machine language , or object code — a format that the operating system will recognize as a proper program and be able to execute.
  • 5. Three types of applications programs translate from source code to object code: compilers, interpreters, and assemblers. The three operate differently and on different types of programming languages, but they serve the same purpose of translating from a programming language into machine language. A compiler translates text files written in a high-level programming language—such as Fortran, C, or Pascal— from the source code to the object code all at once
  • 6. Computer is composed of: 1.CPU (Central Processing Unit) – this is where all mathematical and logical forms of processing are done on data. 2.Memory – before a computer can do any productive work such as programming, it has to remember things such as data it needs to produce information.
  • 7. 3. Input and Output Device – data have to come into the computer by first entering them through input devices. Ex. Keyboard. After the computer executes a program to process data and produce information, this information remains in the memory. Part of the program has to show these results to the outside world. Output devices such as monitor screen and printers are used to display the results to the user.
  • 8. 4. Software – computers today come bundled with some software already installed in them. Operating System – performs for the programmer many tasks that used to be very difficult to program
  • 9. Two forms of Memory • Internal memory (RAM-Random • Access Memory) – stores programs and data that are executed and processed by the computer. Secondary memory – supplements RAM so those computers are able to permanently save programs and data that are not yet needed for execution and processing. Ex. Floppy disk, hard disk & etc.
  • 10. The following are standard Operating System functions. every time •Validating user identification the user uses the computer •Provides standard functions like editor, compilers and linkers •Manages files of the user by providing functions like Copy, Delete, Append
  • 11. The following are standard Operating System functions. •Retrieves data out of data files •Manages memory for the user by determining where in the memory a program is to be loaded every time it is called to run •Makes communication between the CPU, Memory and input/output devices transparent to the user or the user are unaware of these things while they are at work.
  • 12. High level languages – are programming languages that are closer to human language than to machine language. They are characterized to use common English words as their instructions. Aside from that, high level languages have the following characteristics:
  • 13. High level languages • Requires additional step of compilation or translation so that from high-level, another program that has exactly the same meaning and intended results in low-level or machine language can be generated and loaded into the computer and executed. •A compiled program is usually not as efficient as when the program was originally written in machine language or assembly. This is due to the fact that compilers add a lot of extra overheads in terms of memory and non-optimized logical translations.
  • 14. Each of these programming languages was designed to solve particular kinds of problems. • COBOL – Common Business Oriented Language was designed to solve business problems like accounting. • FORTRAN – Formula Translation is a high level language used for scientific and engineering applications. • Pascal and C – are general-purpose language. They are high-level language but they can be embedded with assembly language code effectively making these languages middle-level languages. C language is responsible in the implementation f major software including operating systems, compilers and software development tools.
  • 15. programs perform three basic operations: • get the input from the keyboard • process the input data • display the results on the screen INPUT DATA PROCESS DATA DISPLAY ALL RESULTS
  • 16. The most basic form of a C program follows a very simple format: pre-processor directives main function { declarations statements
  • 17. FirstExam ple /*Converts weight in pounds to kilograms*/ #include <stdio.h> #define kg_in_pound .454 int main() {float pounds, kilograms; /*declare both weights as float data type*/ printf(“Enter weight in pounds :”) scanf(“%f”,&pounds); kilograms = kg_in_pound * pounds; printf(“5.2f Pounds is equal %.2f kilograms,n”, pounds, kilograms); getch(); return(0); }