SlideShare a Scribd company logo
1 of 16
COMPUTER
PROGRAMMING
What is Programming?
Programming is a creative process that
instructs a computer on how to do a task.
Find out more about the different types of
programming.
WHAT IS A PROGRAMMING LANGUAGE?
 Coded language used by programmers to
write instructions that a computer can
understand to do what the programmer
HISTORY OF PROGRAMMING LANGUAGE
1954 - FORTRAN ("Formula Translation“)
Hello , World!
Source code Output
is a general-purpose, imperative programming language that is
especially suited to numeric computation and scientific computing.
1970 - Pascal
a high-level structured computer programming language
used for teaching and general programming.
Hello World
Source code Output
1983 - C++
Source code
Hello World
Output
is a general-purpose programming language. It has imperative,
object-oriented and generic programming features, while also
providing facilities for low-level memory manipulation.
C - 1978
is a powerful general-purpose programming
language. It is fast, portable and available in all
platforms.
Hello World
Source code
Output
1991 – Java
Source code
Hello , World
Output
a general-purpose computer programming language designed to
produce programs that will run on any computer system.
THERE ARE THREE MAIN KINDS OF
PROGRAMMING LANGUAGE:
 Machine language.
 Assembly language.
 High-level language.
C PROGRAMMING LANGUAGE
Input output Libraries
Header File
#include<stdio.h>
Functions
Printf()
Scanf()
#include<conio.h>
Functions
Getch()
Textcolor()
Textbackground()
Main()
{
//Data types Declaration
Type
Keyword
Boolean = Bool
Integer = int
Floating point = float
Character =
char
//Variables Declaration
Variables are part of almost every program
A variable is a “place to put data” and is
usually represented by a letter or a word.
EXAMPLE 1 – A SIMPLE PAYROLL PROGRAM
A Simple Payroll Program
Output
Name:
Basic
Pay:Tax :
Net
Pay:
Joemarie
5,000
500
4,500
THE CORRESPONDING C PROGRAM
#include<stdio.h>
#include<conio.h>
main()
{
// Data Types and Variable Declaration
char name;
int basicpay,tax,netpay;
printf("A Simple Payroll Programn");
printf("Name:");scanf("%s",&name);
printf(" basicpay :");scanf("%d",&basicpay);
printf("Tax:");scanf("%d",&tax);
// formula
netpay=basicpay-tax;
printf("Net Pay: %d",netpay);
getch();
}
Example 2 – A simple Payroll Program using If
Statement
A Simple Payroll Program
Name:
Basic Pay:
Tax :
Net
Pay:
Key in Employee's Data
Employee's
Code:
Joemarie
a
5,000
500
4,500
THE CORRESPONDING C PROGRAM USING IF STATEMENT
#include<stdio.h>
#include<conio.h>
main()
{
// Data Tpyes and Variable Declaration
char name;
char empcode;
int basicpay,tax,netpay;
printf(" A Simple Payroll Programn");
printf(" Key in Employee's Datan");
printf("Name:");scanf("%s",&name);
printf("Employee's Code:");scanf("%s",&empcode);
if(empcode=='a')
basicpay=5000;
else if(empcode=='b')
basicpay=6000;
else if(empcode=='c')
basicpay=7000;
else if(empcode=='d')
basicpay=8000;
else if(empcode=='e')
basicpay=9000;
printf("Basic Pay: %d",basicpay);
printf("n");
printf("Tax:");scanf("%d",&tax);
// formula
netpay=basicpay-tax;
printf("Net Pay: %d",netpay);
getch();
}
LOGICAL ERROR
is a mistake in a program's source code that results in
incorrect or unexpected behavior.
It is a type of runtime error that may simply produce the
wrong output or may cause a program to crash while
running
SYNTAX ERROR
A syntax error is an error in the source code
of a program.
Assignment

More Related Content

What's hot

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentationfazli khaliq
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNSU-Biliran Campus
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops conceptsNilesh Dalvi
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programmingNeeru Mittal
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithmsJulie Iskander
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languagesRohit Shrivastava
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Languagesatvirsandhu9
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
Generations of Programming Languages
Generations of Programming LanguagesGenerations of Programming Languages
Generations of Programming LanguagesTarun Sharma
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notesVIKAS SINGH BHADOURIA
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,Hossain Md Shakhawat
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Programming languages
Programming languagesProgramming languages
Programming languagesAsmasum
 

What's hot (20)

Programming Fundamental Presentation
Programming Fundamental PresentationProgramming Fundamental Presentation
Programming Fundamental Presentation
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Computer programming concepts
Computer programming conceptsComputer programming concepts
Computer programming concepts
 
Introduction to oops concepts
Introduction to oops conceptsIntroduction to oops concepts
Introduction to oops concepts
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 
Data structures and algorithms
Data structures and algorithmsData structures and algorithms
Data structures and algorithms
 
4 evolution-of-programming-languages
4 evolution-of-programming-languages4 evolution-of-programming-languages
4 evolution-of-programming-languages
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 
Presentation on C++ Programming Language
Presentation on C++ Programming LanguagePresentation on C++ Programming Language
Presentation on C++ Programming Language
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
Generations of Programming Languages
Generations of Programming LanguagesGenerations of Programming Languages
Generations of Programming Languages
 
Control statements in c
Control statements in cControl statements in c
Control statements in c
 
Principles of programming languages. Detail notes
Principles of programming languages. Detail notesPrinciples of programming languages. Detail notes
Principles of programming languages. Detail notes
 
Introduction to programming with c,
Introduction to programming with c,Introduction to programming with c,
Introduction to programming with c,
 
Programming Fundamentals
Programming FundamentalsProgramming Fundamentals
Programming Fundamentals
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
C introduction by thooyavan
C introduction by  thooyavanC introduction by  thooyavan
C introduction by thooyavan
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Compilers
CompilersCompilers
Compilers
 

Similar to Theory of programming

Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin Kumar
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1SURBHI SAROHA
 
Introduction
IntroductionIntroduction
IntroductionKamran
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)aaravSingh41
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxAbdalla536859
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming languagesanjay joshi
 
What is turbo c and how it works
What is turbo c and how it worksWhat is turbo c and how it works
What is turbo c and how it worksMark John Lado, MIT
 
00 C hello world.pptx
00 C hello world.pptx00 C hello world.pptx
00 C hello world.pptxCarla227537
 
Chapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfChapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfKirubelWondwoson1
 
Input output statement
Input output statementInput output statement
Input output statementsunilchute1
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c languagefarishah
 
Input output in c
Input output in cInput output in c
Input output in cDucat
 
c_pro_introduction.pptx
c_pro_introduction.pptxc_pro_introduction.pptx
c_pro_introduction.pptxRohitRaj744272
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Shipra Swati
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming languagesanjay joshi
 

Similar to Theory of programming (20)

Sachin kumar ppt on programming in c
Sachin kumar ppt on programming in cSachin kumar ppt on programming in c
Sachin kumar ppt on programming in c
 
Introduction to C Unit 1
Introduction to C Unit 1Introduction to C Unit 1
Introduction to C Unit 1
 
FINAL.ppt
FINAL.pptFINAL.ppt
FINAL.ppt
 
Introduction
IntroductionIntroduction
Introduction
 
C programming presentation(final)
C programming presentation(final)C programming presentation(final)
C programming presentation(final)
 
Chapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptxChapter 1 Introduction to C .pptx
Chapter 1 Introduction to C .pptx
 
C language
C languageC language
C language
 
introduction to c programming language
introduction to c programming languageintroduction to c programming language
introduction to c programming language
 
What is turbo c and how it works
What is turbo c and how it worksWhat is turbo c and how it works
What is turbo c and how it works
 
00 C hello world.pptx
00 C hello world.pptx00 C hello world.pptx
00 C hello world.pptx
 
C basics
C   basicsC   basics
C basics
 
Chapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdfChapter 1 - Basic concepts of programming.pdf
Chapter 1 - Basic concepts of programming.pdf
 
Input output statement
Input output statementInput output statement
Input output statement
 
Introduction of c language
Introduction of c languageIntroduction of c language
Introduction of c language
 
Input output in c
Input output in cInput output in c
Input output in c
 
c_pro_introduction.pptx
c_pro_introduction.pptxc_pro_introduction.pptx
c_pro_introduction.pptx
 
Programming in c
Programming in cProgramming in c
Programming in c
 
Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7Fundamental of Information Technology - UNIT 7
Fundamental of Information Technology - UNIT 7
 
Introduction to c programming language
Introduction to c programming languageIntroduction to c programming language
Introduction to c programming language
 
C programming
C programmingC programming
C programming
 

More from tcc_joemarie

Financial projections and budgets
Financial projections and budgetsFinancial projections and budgets
Financial projections and budgetstcc_joemarie
 
Convert Hexadecimal to decimal
Convert Hexadecimal to decimalConvert Hexadecimal to decimal
Convert Hexadecimal to decimaltcc_joemarie
 
Convert decimal to binary
Convert decimal to binary Convert decimal to binary
Convert decimal to binary tcc_joemarie
 
Introducing to number system
Introducing to number systemIntroducing to number system
Introducing to number systemtcc_joemarie
 
Flexible learning environment
Flexible learning environmentFlexible learning environment
Flexible learning environmenttcc_joemarie
 
Digital literacy skills in the 21st century
Digital literacy skills in the 21st centuryDigital literacy skills in the 21st century
Digital literacy skills in the 21st centurytcc_joemarie
 
Online resources, educational sites and portals
Online resources, educational sites and portalsOnline resources, educational sites and portals
Online resources, educational sites and portalstcc_joemarie
 
The four pillars of education
The four pillars of educationThe four pillars of education
The four pillars of educationtcc_joemarie
 
The concept of algorithm
The concept of algorithmThe concept of algorithm
The concept of algorithmtcc_joemarie
 
Professional development
Professional developmentProfessional development
Professional developmenttcc_joemarie
 

More from tcc_joemarie (12)

Mother board
Mother boardMother board
Mother board
 
Financial projections and budgets
Financial projections and budgetsFinancial projections and budgets
Financial projections and budgets
 
Convert Hexadecimal to decimal
Convert Hexadecimal to decimalConvert Hexadecimal to decimal
Convert Hexadecimal to decimal
 
Convert decimal to binary
Convert decimal to binary Convert decimal to binary
Convert decimal to binary
 
Introducing to number system
Introducing to number systemIntroducing to number system
Introducing to number system
 
People media
People media People media
People media
 
Flexible learning environment
Flexible learning environmentFlexible learning environment
Flexible learning environment
 
Digital literacy skills in the 21st century
Digital literacy skills in the 21st centuryDigital literacy skills in the 21st century
Digital literacy skills in the 21st century
 
Online resources, educational sites and portals
Online resources, educational sites and portalsOnline resources, educational sites and portals
Online resources, educational sites and portals
 
The four pillars of education
The four pillars of educationThe four pillars of education
The four pillars of education
 
The concept of algorithm
The concept of algorithmThe concept of algorithm
The concept of algorithm
 
Professional development
Professional developmentProfessional development
Professional development
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....kzayra69
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....What are the key points to focus on before starting to learn ETL Development....
What are the key points to focus on before starting to learn ETL Development....
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 

Theory of programming

  • 1. COMPUTER PROGRAMMING What is Programming? Programming is a creative process that instructs a computer on how to do a task. Find out more about the different types of programming.
  • 2. WHAT IS A PROGRAMMING LANGUAGE?  Coded language used by programmers to write instructions that a computer can understand to do what the programmer
  • 3. HISTORY OF PROGRAMMING LANGUAGE 1954 - FORTRAN ("Formula Translation“) Hello , World! Source code Output is a general-purpose, imperative programming language that is especially suited to numeric computation and scientific computing.
  • 4. 1970 - Pascal a high-level structured computer programming language used for teaching and general programming. Hello World Source code Output
  • 5. 1983 - C++ Source code Hello World Output is a general-purpose programming language. It has imperative, object-oriented and generic programming features, while also providing facilities for low-level memory manipulation.
  • 6. C - 1978 is a powerful general-purpose programming language. It is fast, portable and available in all platforms. Hello World Source code Output
  • 7. 1991 – Java Source code Hello , World Output a general-purpose computer programming language designed to produce programs that will run on any computer system.
  • 8. THERE ARE THREE MAIN KINDS OF PROGRAMMING LANGUAGE:  Machine language.  Assembly language.  High-level language.
  • 9. C PROGRAMMING LANGUAGE Input output Libraries Header File #include<stdio.h> Functions Printf() Scanf() #include<conio.h> Functions Getch() Textcolor() Textbackground()
  • 10. Main() { //Data types Declaration Type Keyword Boolean = Bool Integer = int Floating point = float Character = char //Variables Declaration Variables are part of almost every program A variable is a “place to put data” and is usually represented by a letter or a word.
  • 11. EXAMPLE 1 – A SIMPLE PAYROLL PROGRAM A Simple Payroll Program Output Name: Basic Pay:Tax : Net Pay: Joemarie 5,000 500 4,500
  • 12. THE CORRESPONDING C PROGRAM #include<stdio.h> #include<conio.h> main() { // Data Types and Variable Declaration char name; int basicpay,tax,netpay; printf("A Simple Payroll Programn"); printf("Name:");scanf("%s",&name); printf(" basicpay :");scanf("%d",&basicpay); printf("Tax:");scanf("%d",&tax); // formula netpay=basicpay-tax; printf("Net Pay: %d",netpay); getch(); }
  • 13. Example 2 – A simple Payroll Program using If Statement A Simple Payroll Program Name: Basic Pay: Tax : Net Pay: Key in Employee's Data Employee's Code: Joemarie a 5,000 500 4,500
  • 14. THE CORRESPONDING C PROGRAM USING IF STATEMENT #include<stdio.h> #include<conio.h> main() { // Data Tpyes and Variable Declaration char name; char empcode; int basicpay,tax,netpay; printf(" A Simple Payroll Programn"); printf(" Key in Employee's Datan"); printf("Name:");scanf("%s",&name); printf("Employee's Code:");scanf("%s",&empcode); if(empcode=='a') basicpay=5000; else if(empcode=='b') basicpay=6000; else if(empcode=='c') basicpay=7000; else if(empcode=='d') basicpay=8000; else if(empcode=='e') basicpay=9000; printf("Basic Pay: %d",basicpay); printf("n"); printf("Tax:");scanf("%d",&tax); // formula netpay=basicpay-tax; printf("Net Pay: %d",netpay); getch(); }
  • 15. LOGICAL ERROR is a mistake in a program's source code that results in incorrect or unexpected behavior. It is a type of runtime error that may simply produce the wrong output or may cause a program to crash while running SYNTAX ERROR A syntax error is an error in the source code of a program.