SlideShare a Scribd company logo
Translators
• A translator is a computer program that performs the translation of a program
written in a given programming language into a functionally equivalent program in
a different computer language, without losing the functional or logical structure of
the original code
• These include translations between high-level and human-readable computer
languages such as C++ and Java , intermediate-level languages such as Java byte
code, low-level languages such as the assembly language and machine code,
Types of Translators
Assembler:
• An assembler translates assembly language into machine code.
Interpreter:
• An interpreter program executes other programs directly, running through
program code and executing it line-by-line.
Compiler:
• A Compiler is a computer program that translates code written in a high
level language to a lower level language, object/machine code.
Simple C Program
/* A first C Program*/
#include <stdio.h>
void main()
{
printf("Hello World n");
}
Simple C Program
/* A first C Program*/
#include <stdio.h>
#include <conio.h>
void main()
{
printf("Hello World n");
getch();
}
Simple C Program
• Line 1: #include <stdio.h>
• As part of compilation, the C compiler runs a program called
the C preprocessor. The preprocessor is able to add and
remove code from your source file.
• In this case, the directive #include tells the preprocessor to
include code from the file stdio.h.
• This file contains declarations for functions that the program
needs to use. A declaration for the print function is in this file.
Simple C Program
• Line 2: void main()
• This statement declares the main function.
• C program can contain many functions but must always have
one main function.
• A function is a self-contained module of code that can
accomplish some task.
• "void" specifies the return type of main. In this case, nothing is
returned to the operating system.
Simple C Program
• Line 3: {
• This opening bracket denotes the start of the
program.
Simple C Program
• Line 4: printf("Hello Worldn");
• printf is a function from a standard C library that is
used to print strings to the standard output, normally
your screen.
• The "n" is a special format modifier that tells the
printf to put a line feed at the end of the line.
• If there were another printf in this program, its string
would print on the next line.
Simple C Program
• Line 5: }
• This closing bracket denotes the end of the
program.
Basics of C Environment
• C systems consist of 3 parts
• Environment
• Language
• C Standard Library
• Development environment has 6 phases
 Edit - Writing the source code by using some IDE or editor
 Pre-processor - Already available routines
 Compile - translates or converts source to object code for a
specific platform ie., source code -> object code
 Link - resolves external references and produces the executable
module
 Load – put the program into the memory
 Execute – runs the program
Basics of C Environment
Editor DiskPhase 1
Program edited in
Editor and stored
on disk
Preprocessor DiskPhase 2
Preprocessor
program processes
the code
Compiler DiskPhase 3
Creates object code
and stores on disk
Linker DiskPhase 4
Links object code
with libraries and
stores on disk
Basics of C Environment
LoaderPhase 5
Puts program in
memory
Primary memory
CPUPhase 6
Takes each instruction
and executes it storing
new data values
Primary memory
Executing a C Program
Steps involved in execution are
• Creating the program
• Compiling the program
• Linking the program with functions that are needed from the C
library
• Executing the program
Executing a C Program
Edit
Program
Source
Code
Compile
Object
Code
Link Object
Code Executable
Library
Files

More Related Content

PDF
Conditional operators
BU
 
PPTX
Control statements in c
Sathish Narayanan
 
PPTX
types of loops and what is loop
waheed dogar
 
PDF
Loops and conditional statements
Saad Sheikh
 
PPT
structure and union
student
 
PPTX
digital computers
HumaKhan156
 
PPTX
If statements in c programming
Archana Gopinath
 
PPTX
File handling in c
aakanksha s
 
Conditional operators
BU
 
Control statements in c
Sathish Narayanan
 
types of loops and what is loop
waheed dogar
 
Loops and conditional statements
Saad Sheikh
 
structure and union
student
 
digital computers
HumaKhan156
 
If statements in c programming
Archana Gopinath
 
File handling in c
aakanksha s
 

What's hot (20)

PPTX
Decision Making Statement in C ppt
MANJUTRIPATHI7
 
PDF
Constants Variables Datatypes by Mrs. Sowmya Jyothi
SowmyaJyothi3
 
PPTX
Variables in C and C++ Language
Way2itech
 
PPTX
Introduction to C Programming
Anandhasilambarasan D
 
DOCX
Python unit 3 and Unit 4
Anandh Arumugakan
 
PDF
Control statements
Kanwalpreet Kaur
 
PPTX
datatypes and variables in c language
Rai University
 
PPTX
Function C programming
Appili Vamsi Krishna
 
PDF
File operations
PrabhatKumarChaudhar2
 
PPTX
Decision makingandbranching in c
NMahendiran
 
PPTX
Presentation on Function in C Programming
Shuvongkor Barman
 
PPT
Lecture 5 - Structured Programming Language
Md. Imran Hossain Showrov
 
PPTX
Manipulators
VaishnaviVaishnavi17
 
PPT
Basics of C.ppt
8759000398
 
PDF
Unit ii chapter 2 Decision making and Branching in C
Sowmya Jyothi
 
PPTX
Input Output Management In C Programming
Kamal Acharya
 
PPTX
classes and objects in C++
HalaiHansaika
 
PPTX
Control and conditional statements
rajshreemuthiah
 
PDF
Control structures in Java
Ravi_Kant_Sahu
 
Decision Making Statement in C ppt
MANJUTRIPATHI7
 
Constants Variables Datatypes by Mrs. Sowmya Jyothi
SowmyaJyothi3
 
Variables in C and C++ Language
Way2itech
 
Introduction to C Programming
Anandhasilambarasan D
 
Python unit 3 and Unit 4
Anandh Arumugakan
 
Control statements
Kanwalpreet Kaur
 
datatypes and variables in c language
Rai University
 
Function C programming
Appili Vamsi Krishna
 
File operations
PrabhatKumarChaudhar2
 
Decision makingandbranching in c
NMahendiran
 
Presentation on Function in C Programming
Shuvongkor Barman
 
Lecture 5 - Structured Programming Language
Md. Imran Hossain Showrov
 
Manipulators
VaishnaviVaishnavi17
 
Basics of C.ppt
8759000398
 
Unit ii chapter 2 Decision making and Branching in C
Sowmya Jyothi
 
Input Output Management In C Programming
Kamal Acharya
 
classes and objects in C++
HalaiHansaika
 
Control and conditional statements
rajshreemuthiah
 
Control structures in Java
Ravi_Kant_Sahu
 
Ad

Similar to Programming Fundamentals and Programming Languages Concepts Translators (20)

PPT
C PROGRAMMING
Stalongiles Philip
 
PPT
C intro
Mohit Patodia
 
PPTX
C PROGRAMMING AND DATA STRUCTURE _PPT.pptx
Prabu P
 
PPTX
Programming Fundamentals IDE's Lec3.pptx
hafsanadeem31
 
PPTX
Pros and cons of c as a compiler language
Ashok Raj
 
PPTX
Compiler Construction Introduction Slide PPT
usmanjami
 
PPTX
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
PDF
Fundamental of Information Technology - UNIT 7
Shipra Swati
 
PPTX
Embedded c c++ programming fundamentals master
Hossam Hassan
 
PPTX
Programming in c
vishnu973656
 
PPTX
Programming in C
Rvishnupriya2
 
PDF
Chapter1.pdf
tharwatabdulhmed
 
PPTX
Ch2 C Fundamentals
SzeChingChen
 
PPTX
Csc240 -lecture_3
Ainuddin Yousufzai
 
PDF
Programming Fundamentals and basic knowledge
imtiazalijoono
 
PDF
C.pdf
5reality786
 
PPTX
C languaGE UNIT-1
Malikireddy Bramhananda Reddy
 
PPTX
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
Malikireddy Bramhananda Reddy
 
PPTX
C language unit-1
Malikireddy Bramhananda Reddy
 
PPTX
Introduction to Programmihhbbhhbbbng.pptx
onkarsinghphotos1977
 
C PROGRAMMING
Stalongiles Philip
 
C intro
Mohit Patodia
 
C PROGRAMMING AND DATA STRUCTURE _PPT.pptx
Prabu P
 
Programming Fundamentals IDE's Lec3.pptx
hafsanadeem31
 
Pros and cons of c as a compiler language
Ashok Raj
 
Compiler Construction Introduction Slide PPT
usmanjami
 
Transpilers(Source-to-Source Compilers)
Shivang Bajaniya
 
Fundamental of Information Technology - UNIT 7
Shipra Swati
 
Embedded c c++ programming fundamentals master
Hossam Hassan
 
Programming in c
vishnu973656
 
Programming in C
Rvishnupriya2
 
Chapter1.pdf
tharwatabdulhmed
 
Ch2 C Fundamentals
SzeChingChen
 
Csc240 -lecture_3
Ainuddin Yousufzai
 
Programming Fundamentals and basic knowledge
imtiazalijoono
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
Malikireddy Bramhananda Reddy
 
Introduction to Programmihhbbhhbbbng.pptx
onkarsinghphotos1977
 
Ad

More from imtiazalijoono (20)

PDF
Embedded systems io programming
imtiazalijoono
 
PDF
Embedded systems tools & peripherals
imtiazalijoono
 
PPTX
Importance of reading and its types.
imtiazalijoono
 
PPTX
Negative amplifiers and its types Positive feedback and Negative feedback
imtiazalijoono
 
PPTX
Multistage amplifiers and Name of coupling Name of multistage amplifier
imtiazalijoono
 
PDF
Loop Introduction for Loop while Loop do while Loop Nested Loops Values of...
imtiazalijoono
 
PDF
Programming Fundamentals Functions in C and types
imtiazalijoono
 
PDF
Software Development Software development process
imtiazalijoono
 
PDF
Programming Fundamentals Decisions
imtiazalijoono
 
PDF
C Building Blocks
imtiazalijoono
 
PDF
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
PPTX
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
DOCX
Programming Global variable
imtiazalijoono
 
PPTX
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
PPTX
NTRODUCTION TO COMPUTER PROGRAMMING Loop as repetitive statement,
imtiazalijoono
 
PPTX
Arithmetic and Arithmetic assignment operators
imtiazalijoono
 
PPTX
INTRODUCTION TO COMPUTER PROGRAMMING
imtiazalijoono
 
PPTX
COMPUTER PROGRAMMING
imtiazalijoono
 
PPTX
COMPUTER PROGRAMMING
imtiazalijoono
 
PPTX
FIELD EFFECT TRANSISTERS (FET)
imtiazalijoono
 
Embedded systems io programming
imtiazalijoono
 
Embedded systems tools & peripherals
imtiazalijoono
 
Importance of reading and its types.
imtiazalijoono
 
Negative amplifiers and its types Positive feedback and Negative feedback
imtiazalijoono
 
Multistage amplifiers and Name of coupling Name of multistage amplifier
imtiazalijoono
 
Loop Introduction for Loop while Loop do while Loop Nested Loops Values of...
imtiazalijoono
 
Programming Fundamentals Functions in C and types
imtiazalijoono
 
Software Development Software development process
imtiazalijoono
 
Programming Fundamentals Decisions
imtiazalijoono
 
C Building Blocks
imtiazalijoono
 
Programming Fundamentals Arrays and Strings
imtiazalijoono
 
Programming Fundamentals and Programming Languages Concepts
imtiazalijoono
 
Programming Global variable
imtiazalijoono
 
Array Introduction One-dimensional array Multidimensional array
imtiazalijoono
 
NTRODUCTION TO COMPUTER PROGRAMMING Loop as repetitive statement,
imtiazalijoono
 
Arithmetic and Arithmetic assignment operators
imtiazalijoono
 
INTRODUCTION TO COMPUTER PROGRAMMING
imtiazalijoono
 
COMPUTER PROGRAMMING
imtiazalijoono
 
COMPUTER PROGRAMMING
imtiazalijoono
 
FIELD EFFECT TRANSISTERS (FET)
imtiazalijoono
 

Recently uploaded (20)

PDF
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
PPT
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
PDF
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
PDF
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
PPTX
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
PPTX
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
PPTX
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
PDF
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTX
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PPTX
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
PPTX
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
PPTX
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
DOCX
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
PPTX
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
PDF
Sunset Boulevard Student Revision Booklet
jpinnuck
 
PPTX
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
PDF
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
PPTX
Autodock-for-Beginners by Rahul D Jawarkar.pptx
Rahul Jawarkar
 
PPTX
Care of patients with elImination deviation.pptx
AneetaSharma15
 
PPTX
Trends in pediatric nursing .pptx
AneetaSharma15
 
2.Reshaping-Indias-Political-Map.ppt/pdf/8th class social science Exploring S...
Sandeep Swamy
 
Python Programming Unit II Control Statements.ppt
CUO VEERANAN VEERANAN
 
Study Material and notes for Women Empowerment
ComputerScienceSACWC
 
Health-The-Ultimate-Treasure (1).pdf/8th class science curiosity /samyans edu...
Sandeep Swamy
 
FSSAI (Food Safety and Standards Authority of India) & FDA (Food and Drug Adm...
Dr. Paindla Jyothirmai
 
CONCEPT OF CHILD CARE. pptx
AneetaSharma15
 
Python-Application-in-Drug-Design by R D Jawarkar.pptx
Rahul Jawarkar
 
What is CFA?? Complete Guide to the Chartered Financial Analyst Program
sp4989653
 
PPTs-The Rise of Empiresghhhhhhhh (1).pptx
academysrusti114
 
PREVENTIVE PEDIATRIC. pptx
AneetaSharma15
 
family health care settings home visit - unit 6 - chn 1 - gnm 1st year.pptx
Priyanshu Anand
 
Introduction to pediatric nursing in 5th Sem..pptx
AneetaSharma15
 
SAROCES Action-Plan FOR ARAL PROGRAM IN DEPED
Levenmartlacuna1
 
Five Point Someone – Chetan Bhagat | Book Summary & Analysis by Bhupesh Kushwaha
Bhupesh Kushwaha
 
Sunset Boulevard Student Revision Booklet
jpinnuck
 
Tips Management in Odoo 18 POS - Odoo Slides
Celine George
 
The-Invisible-Living-World-Beyond-Our-Naked-Eye chapter 2.pdf/8th science cur...
Sandeep Swamy
 
Autodock-for-Beginners by Rahul D Jawarkar.pptx
Rahul Jawarkar
 
Care of patients with elImination deviation.pptx
AneetaSharma15
 
Trends in pediatric nursing .pptx
AneetaSharma15
 

Programming Fundamentals and Programming Languages Concepts Translators

  • 1. Translators • A translator is a computer program that performs the translation of a program written in a given programming language into a functionally equivalent program in a different computer language, without losing the functional or logical structure of the original code • These include translations between high-level and human-readable computer languages such as C++ and Java , intermediate-level languages such as Java byte code, low-level languages such as the assembly language and machine code,
  • 2. Types of Translators Assembler: • An assembler translates assembly language into machine code. Interpreter: • An interpreter program executes other programs directly, running through program code and executing it line-by-line. Compiler: • A Compiler is a computer program that translates code written in a high level language to a lower level language, object/machine code.
  • 3. Simple C Program /* A first C Program*/ #include <stdio.h> void main() { printf("Hello World n"); }
  • 4. Simple C Program /* A first C Program*/ #include <stdio.h> #include <conio.h> void main() { printf("Hello World n"); getch(); }
  • 5. Simple C Program • Line 1: #include <stdio.h> • As part of compilation, the C compiler runs a program called the C preprocessor. The preprocessor is able to add and remove code from your source file. • In this case, the directive #include tells the preprocessor to include code from the file stdio.h. • This file contains declarations for functions that the program needs to use. A declaration for the print function is in this file.
  • 6. Simple C Program • Line 2: void main() • This statement declares the main function. • C program can contain many functions but must always have one main function. • A function is a self-contained module of code that can accomplish some task. • "void" specifies the return type of main. In this case, nothing is returned to the operating system.
  • 7. Simple C Program • Line 3: { • This opening bracket denotes the start of the program.
  • 8. Simple C Program • Line 4: printf("Hello Worldn"); • printf is a function from a standard C library that is used to print strings to the standard output, normally your screen. • The "n" is a special format modifier that tells the printf to put a line feed at the end of the line. • If there were another printf in this program, its string would print on the next line.
  • 9. Simple C Program • Line 5: } • This closing bracket denotes the end of the program.
  • 10. Basics of C Environment • C systems consist of 3 parts • Environment • Language • C Standard Library • Development environment has 6 phases  Edit - Writing the source code by using some IDE or editor  Pre-processor - Already available routines  Compile - translates or converts source to object code for a specific platform ie., source code -> object code  Link - resolves external references and produces the executable module  Load – put the program into the memory  Execute – runs the program
  • 11. Basics of C Environment Editor DiskPhase 1 Program edited in Editor and stored on disk Preprocessor DiskPhase 2 Preprocessor program processes the code Compiler DiskPhase 3 Creates object code and stores on disk Linker DiskPhase 4 Links object code with libraries and stores on disk
  • 12. Basics of C Environment LoaderPhase 5 Puts program in memory Primary memory CPUPhase 6 Takes each instruction and executes it storing new data values Primary memory
  • 13. Executing a C Program Steps involved in execution are • Creating the program • Compiling the program • Linking the program with functions that are needed from the C library • Executing the program
  • 14. Executing a C Program Edit Program Source Code Compile Object Code Link Object Code Executable Library Files

Editor's Notes

  • #2: C is called a structured programming language because to solve a large problem, C programming language divides the problem into smaller modules called functions or procedures each of which handles a perticular responsibility. 
  • #3: C is called a structured programming language because to solve a large problem, C programming language divides the problem into smaller modules called functions or procedures each of which handles a perticular responsibility.