SlideShare a Scribd company logo
Introduction to
Computer
Programming
Lanie P. Plecerda
Instructor 3
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.
The Turbo C Environment
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.
•Validating user identification
every time 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.
The Simplest computer
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
}
First Example
/*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 -
Ad

Recommended

Introduction to computer programming
Introduction to computer programming
NSU-Biliran Campus
 
Introduction to computer programming
Introduction to computer programming
Sangheethaa Sukumaran
 
Introduction to Computer and Programming - Lecture 01
Introduction to Computer and Programming - Lecture 01
hassaanciit
 
Lecture 4- Computer Software and Languages
Lecture 4- Computer Software and Languages
Md. Imran Hossain Showrov
 
L2 ch1
L2 ch1
Taqsim Rajon
 
Lecture 2 - Introductory Concepts
Lecture 2 - Introductory Concepts
Md. Imran Hossain Showrov
 
Software
Software
Kalsoom shoukat
 
Interaction With Computers FIT
Interaction With Computers FIT
Raj vardhan
 
Lecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devices
Md. Imran Hossain Showrov
 
MCA-5 unit1
MCA-5 unit1
Vasanti Dutta
 
Programming for Problem Solving
Programming for Problem Solving
Sukhendra Singh
 
Lecture 22 - Error Handling
Lecture 22 - Error Handling
Md. Imran Hossain Showrov
 
computer language with full detail
computer language with full detail
sonykhan3
 
Language processors
Language processors
Dr. B T Sampath Kumar
 
Unit i (part2) b.sc
Unit i (part2) b.sc
Hepsijeba
 
computer Unit 6
computer Unit 6
Aqeel Rehman
 
Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)
Digvijaysinh Gohil
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
Sehrish Rafiq
 
Programming
Programming
Dr. B T Sampath Kumar
 
Computer software and operating system
Computer software and operating system
sonykhan3
 
Perfect papers software
Perfect papers software
guest0a1ce99
 
System Programming
System Programming
JahnaviBhagat
 
Types of system software
Types of system software
Inderbir Kaur Sandhu
 
Richa garg itm
Richa garg itm
richagarg16
 
system software and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
chetan birla
 
Unit 2 computer software
Unit 2 computer software
Hardik Patel
 
Computer Programs & System Softwares
Computer Programs & System Softwares
Abijah Naresh Jumani
 
Software and os ch5
Software and os ch5
Khan Yousafzai
 
Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3
Trevor Warren
 
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
angewatkins
 

More Related Content

What's hot (20)

Lecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devices
Md. Imran Hossain Showrov
 
MCA-5 unit1
MCA-5 unit1
Vasanti Dutta
 
Programming for Problem Solving
Programming for Problem Solving
Sukhendra Singh
 
Lecture 22 - Error Handling
Lecture 22 - Error Handling
Md. Imran Hossain Showrov
 
computer language with full detail
computer language with full detail
sonykhan3
 
Language processors
Language processors
Dr. B T Sampath Kumar
 
Unit i (part2) b.sc
Unit i (part2) b.sc
Hepsijeba
 
computer Unit 6
computer Unit 6
Aqeel Rehman
 
Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)
Digvijaysinh Gohil
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
Sehrish Rafiq
 
Programming
Programming
Dr. B T Sampath Kumar
 
Computer software and operating system
Computer software and operating system
sonykhan3
 
Perfect papers software
Perfect papers software
guest0a1ce99
 
System Programming
System Programming
JahnaviBhagat
 
Types of system software
Types of system software
Inderbir Kaur Sandhu
 
Richa garg itm
Richa garg itm
richagarg16
 
system software and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
chetan birla
 
Unit 2 computer software
Unit 2 computer software
Hardik Patel
 
Computer Programs & System Softwares
Computer Programs & System Softwares
Abijah Naresh Jumani
 
Software and os ch5
Software and os ch5
Khan Yousafzai
 
Lecture 3 - Processors, Memory and I/O devices
Lecture 3 - Processors, Memory and I/O devices
Md. Imran Hossain Showrov
 
Programming for Problem Solving
Programming for Problem Solving
Sukhendra Singh
 
computer language with full detail
computer language with full detail
sonykhan3
 
Unit i (part2) b.sc
Unit i (part2) b.sc
Hepsijeba
 
Block diagram (computer programming & utilization)
Block diagram (computer programming & utilization)
Digvijaysinh Gohil
 
Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
Sehrish Rafiq
 
Computer software and operating system
Computer software and operating system
sonykhan3
 
Perfect papers software
Perfect papers software
guest0a1ce99
 
system software and application software, compiler, interpreter & assembler
system software and application software, compiler, interpreter & assembler
chetan birla
 
Unit 2 computer software
Unit 2 computer software
Hardik Patel
 
Computer Programs & System Softwares
Computer Programs & System Softwares
Abijah Naresh Jumani
 

Viewers also liked (18)

Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3
Trevor Warren
 
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
angewatkins
 
ZO-16 17 18-bereikbaar haaglanden
ZO-16 17 18-bereikbaar haaglanden
Michel Oldenburg
 
Publication plan
Publication plan
miajones123_
 
Fall Directors 2014: Policy Options Pitch
Fall Directors 2014: Policy Options Pitch
Bonner Foundation
 
Antrix l zone dwarka delhi 9891201118
Antrix l zone dwarka delhi 9891201118
yogeshkuma2020
 
Buku pegangan-guru-matematika-sma-kelas-10-kurikulum-2013-edisi-revisi-2014
Buku pegangan-guru-matematika-sma-kelas-10-kurikulum-2013-edisi-revisi-2014
fitriana416
 
The impact of technology on health law
The impact of technology on health law
Omar Ha-Redeye
 
Fall Directors 2014: Effective Site and Issue Based
Fall Directors 2014: Effective Site and Issue Based
Bonner Foundation
 
Biznesiin erh zvi
Biznesiin erh zvi
Librarian
 
Okna Schuco Poznań schuco-centrum.pl
Okna Schuco Poznań schuco-centrum.pl
Piotr Mrówczyński
 
Pengenalan ktb
Pengenalan ktb
Naomi Fortuna
 
Survival camp 2014
Survival camp 2014
Weena Wongwaiwit
 
історія еом.Ppt
історія еом.Ppt
LilaMazur
 
Простая Модель Удержания, Клуб Интернет Маркетологов, 2014
Простая Модель Удержания, Клуб Интернет Маркетологов, 2014
Paul Levchuk
 
Huulichid
Huulichid
Librarian
 
L'impresa ideale: corretta e competitiva
L'impresa ideale: corretta e competitiva
Digital marketing & Social listening strategist
 
Proactive performance management_what_is_all_about_v0.3
Proactive performance management_what_is_all_about_v0.3
Trevor Warren
 
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
Joyce Kenkre - Community Nursing Research Strategy Conference 2014
angewatkins
 
ZO-16 17 18-bereikbaar haaglanden
ZO-16 17 18-bereikbaar haaglanden
Michel Oldenburg
 
Fall Directors 2014: Policy Options Pitch
Fall Directors 2014: Policy Options Pitch
Bonner Foundation
 
Antrix l zone dwarka delhi 9891201118
Antrix l zone dwarka delhi 9891201118
yogeshkuma2020
 
Buku pegangan-guru-matematika-sma-kelas-10-kurikulum-2013-edisi-revisi-2014
Buku pegangan-guru-matematika-sma-kelas-10-kurikulum-2013-edisi-revisi-2014
fitriana416
 
The impact of technology on health law
The impact of technology on health law
Omar Ha-Redeye
 
Fall Directors 2014: Effective Site and Issue Based
Fall Directors 2014: Effective Site and Issue Based
Bonner Foundation
 
Biznesiin erh zvi
Biznesiin erh zvi
Librarian
 
Okna Schuco Poznań schuco-centrum.pl
Okna Schuco Poznań schuco-centrum.pl
Piotr Mrówczyński
 
історія еом.Ppt
історія еом.Ppt
LilaMazur
 
Простая Модель Удержания, Клуб Интернет Маркетологов, 2014
Простая Модель Удержания, Клуб Интернет Маркетологов, 2014
Paul Levchuk
 
Ad

Similar to Introductiontocomputerprogramming 140713205433-phpapp02 (20)

introductiontocomputerprogramming-140713205433-phpapp02.pptx
introductiontocomputerprogramming-140713205433-phpapp02.pptx
ummeafruz
 
introductiontocomputerprogramming.pptx
introductiontocomputerprogramming.pptx
HazardRhenz1
 
Program Logic and Design
Program Logic and Design
Froilan Cantillo
 
Computer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
Introduction To Programming In C Language C Programming Best C Programming La...
Introduction To Programming In C Language C Programming Best C Programming La...
simanuaderli
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
lecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentals
fazayn927
 
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
ZainabNoor83
 
C progrmming
C progrmming
Shivam Singhal
 
6272 cnote
6272 cnote
P Kiran Sree
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Introduction to computers and programming languages
Introduction to computers and programming languages
binoysatheesh
 
C with lab
C with lab
ParveenSingh73
 
Computer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
muhammadumairsoftwar
 
Csc240 lecture 1
Csc240 lecture 1
Ainuddin Yousufzai
 
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy1.pdf
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy1.pdf
amanpathak160605
 
Programming languages
Programming languages
sushma chinta
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
Introduction to Computer Programming
Introduction to Computer Programming
Amity University | FMS - DU | IMT | Stratford University | KKMI International Institute | AIMA | DTU
 
introductiontocomputerprogramming-140713205433-phpapp02.pptx
introductiontocomputerprogramming-140713205433-phpapp02.pptx
ummeafruz
 
introductiontocomputerprogramming.pptx
introductiontocomputerprogramming.pptx
HazardRhenz1
 
Computer and programing basics.pptx
Computer and programing basics.pptx
gaafergoda
 
Introduction To Programming In C Language C Programming Best C Programming La...
Introduction To Programming In C Language C Programming Best C Programming La...
simanuaderli
 
Introduction to Computer, Programming languages , Networks and Internet.pptx
Introduction to Computer, Programming languages , Networks and Internet.pptx
SheharBano86
 
lecture Slides - Week 1.programming fundamentals
lecture Slides - Week 1.programming fundamentals
fazayn927
 
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
Programming Lecture 01 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
ZainabNoor83
 
Lecture-1-Introduction-Sep02-2018 (1).pptx
Lecture-1-Introduction-Sep02-2018 (1).pptx
jamesaaronguevarra1
 
Introduction to computers and programming languages
Introduction to computers and programming languages
binoysatheesh
 
Computer Programming In C.pptx
Computer Programming In C.pptx
chouguleamruta24
 
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
Lecture 1 Introduction.pptx hfjsh huwhf uwej wiuehfi w
muhammadumairsoftwar
 
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy1.pdf
C_Dayyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy1.pdf
amanpathak160605
 
Programming languages
Programming languages
sushma chinta
 
Programming Fundamentals and Programming Languages Concepts
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
Ad

Recently uploaded (20)

Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Reducing Conflicts and Increasing Safety Along the Cycling Networks of East-F...
Safe Software
 
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance Seminar State of Passkeys.pptx
FIDO Alliance
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
Can We Use Rust to Develop Extensions for PostgreSQL? (POSETTE: An Event for ...
NTT DATA Technology & Innovation
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Floods in Valencia: Two FME-Powered Stories of Data Resilience
Safe Software
 
Data Validation and System Interoperability
Data Validation and System Interoperability
Safe Software
 
Crypto Super 500 - 14th Report - June2025.pdf
Crypto Super 500 - 14th Report - June2025.pdf
Stephen Perrenod
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
June Patch Tuesday
June Patch Tuesday
Ivanti
 
Bridging the divide: A conversation on tariffs today in the book industry - T...
Bridging the divide: A conversation on tariffs today in the book industry - T...
BookNet Canada
 
Edge-banding-machines-edgeteq-s-200-en-.pdf
Edge-banding-machines-edgeteq-s-200-en-.pdf
AmirStern2
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
Tech-ASan: Two-stage check for Address Sanitizer - Yixuan Cao.pdf
caoyixuan2019
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
FME for Good: Integrating Multiple Data Sources with APIs to Support Local Ch...
Safe Software
 
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
SAP Modernization Strategies for a Successful S/4HANA Journey.pdf
Precisely
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Seminar: Evolving Landscape of Post-Quantum Cryptography.pptx
FIDO Alliance
 

Introductiontocomputerprogramming 140713205433-phpapp02

  • 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. The Turbo C Environment
  • 6. 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
  • 7. 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.
  • 8. 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.
  • 9. 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
  • 10. 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.
  • 11. The following are standard Operating System functions. •Validating user identification every time 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
  • 12. 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.
  • 13. 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:
  • 14. 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.
  • 15. 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.
  • 16. The Simplest computer 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
  • 17. The most basic form of a C program follows a very simple format: pre-processor directives main function { declarations statements }
  • 18. First Example /*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); }