0% found this document useful (0 votes)
7 views

1. Basics

The document discusses the importance of programming languages, particularly C, in various fields such as operating systems, embedded systems, and game development. It outlines the history and purpose of programming, types of programming languages, and the roles of translators like assemblers, compilers, and interpreters. Additionally, it compares compilers and interpreters, highlighting their differences in execution and error handling.

Uploaded by

resam.zaha.hp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

1. Basics

The document discusses the importance of programming languages, particularly C, in various fields such as operating systems, embedded systems, and game development. It outlines the history and purpose of programming, types of programming languages, and the roles of translators like assemblers, compilers, and interpreters. Additionally, it compares compilers and interpreters, highlighting their differences in execution and error handling.

Uploaded by

resam.zaha.hp
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Why C?

• Operating System (OS)


• Embedded System (ES)
• Microcontroller based programming (Robotics)
• System Programming
• Programming Language Development
• Game Engine
• Programming Contest

1
History of Programming Language

2
Computer Programming
• Computer programming is the process of designing, writing, testing, debugging
and maintaining the source code of computer programs.
• This source code is written in one or more programming languages (such as C+
+, C#, Java, Python, Smalltalk, etc.).

3
Purpose of Programming
• The purpose of programming is to create a set of instructions that computers use
to perform specific operations or to exhibit desired behaviors.

4
Type of Programming Language
• Machine languages

• Assembly languages

• Higher-level languages

5
Machine Languages
• Machine languages (first-generation languages) are the most basic type of
computer languages, consisting of strings of numbers the computer's hardware
can use.

• Different types of hardware use different machine code. For example, IBM
computers use different machine language than Apple computers

6
Assembly Languages
• Assembly languages (second-generation languages) are only somewhat easier to
work with than machine languages.

• To create programs in assembly language, developers use cryptic English-like


phrases to represent strings of numbers.

• The code is then translated into object code, using a translator called an
assembler.

7
Assembly
code

Assembler

Object
code 8
Higher-Level Languages
• Higher-level languages are more powerful than assembly language and allow
the programmer to work in a more English-like environment.

• Higher-level programming languages are divided into three "generations," each


more powerful than the last:

• Third-generation languages

• Fourth-generation languages

• Fifth-generation languages
9
10
11
Languages!

12
Translator
• Translators are just computer programs which accept a
program written in high level or low level language and
produce an equivalent machine level program as output.
Translators are of three types:
▪ Assembler

▪ Compiler

▪ Interpreter

13
Assembler
• Assembler is used for converting the code of low level language (assembly
language) into machine level language.

14
Compiler
• The compiler is one kind of system software that translates
the programs written in high level language to machine
language.

15
Interpreter
• The interpreter is a system software which use to convert
high level language programs to machine language. But it
convert one line at a time and execute it then it convert
next line and so on.

16
Compiler vs Interpreter
• A complier converts the high level instruction into machine language while an
interpreter converts the high level instruction into an intermediate form.
• The compiler executes the entire program at a time, but the interpreter executes
each and every line individually.
• List of errors is created by the compiler after the compilation process while an
interpreter stops translating after the first error.
• Autonomous executable file is generated by the compiler while interpreter is
compulsory for an interpreter program.
• Interpreter is smaller and simpler than compiler
• Interpreter is slower than compiler.
17
Compiler vs Interpreter

18

You might also like