difference between high and low level language

13

Upload: kyria

Post on 22-Jan-2016

34 views

Category:

Documents


0 download

DESCRIPTION

Difference Between High and Low Level Language. Introduction to C-language. C is a High level language. An experienced C programmer said you can do anything in C and This statement is back up by his huge collection of programmes developed using C. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Difference Between High and Low Level Language
Page 2: Difference Between High and Low Level Language

Difference Between High and Low Level Language Low Level High Level

Programmer have to write object code

Programmer have to write source code

Not understandable Near to human language

Defined at hardware level Not defined at hardware level

Low portable Highly portable

Run only at one hardware Can run on another hardware

Not easy to debug Easy to debug

Slow coding Fast coding

Page 3: Difference Between High and Low Level Language

Introduction to C-languageC is a High level languageAn experienced C programmer said you can do anything in C and This statement is back up by his huge collection of programmes developed using C

C was used to write many operating systems most part of Unix is written in C

Page 4: Difference Between High and Low Level Language

History of CC was founded by Dennis_Ritchie at Bell Laboratories in 1970. The team headed by Dennis was working on Linux operating system suddenly they noticed that their codes can be introduced as a whole language. A & B languages were also exist that time so named their language as C. C wasoriginally implemented on a DEC PDP-11 computer in 1972.

C evolved from two previous languages, BCPL and B. BCPL was developed in 1967 byMartin Richards as a language for writing operating-systems software and compilers.

Dennis_Ritchi

Page 5: Difference Between High and Low Level Language

Bell LabsBell is a historic lab many inventations took place here.It is satuated in new jercy America Bell

labs

The first transistor was made in Bell Labs

Page 6: Difference Between High and Low Level Language

C-ProgrammingC uses Structured Programming technique

Structured programming is an easy and simple technique for writing programs. This technique uses only three types of instructions.

1) Sequential Structure

2) Conditional / Selective Structure

3) Iterative / Repetitive Structure

Structured Programming

Page 7: Difference Between High and Low Level Language

Sequential Structure

Statement 1

Statement 2

Statement 3

Statement 4

Page 8: Difference Between High and Low Level Language

Conditional Structure

ConditionT / F

Statement 1 Statement 2

True False

Three type of conditions are avalible in C

IF IF ELSE Switch

Page 9: Difference Between High and Low Level Language

Iterative Structure

ConditionT / F

Statement(s)

Truee

False

Three type of Iterative are avalible in C

WHILE FORDO WHILE

Page 10: Difference Between High and Low Level Language

C Compiler Compiler is a language translator . When we write a program in C the Compiler changes it into machine language or low level. The process of compiling a high-level language program into machine language can take a considerable amount of computer time

Page 11: Difference Between High and Low Level Language

Simple C program

#include<stdio.h>#include<conio.h>Void main{ clrscr();Int a=5, b=10,sum;printf(“The Sum =%d”,sum=a+b);getch();}

preprocessor

Main function

Body of program

Variable names

Place HolderData Type C statement

Page 12: Difference Between High and Low Level Language
Page 13: Difference Between High and Low Level Language

Structure of C programSummary of major points for c program execution begins at main () Keywords are written in lower-case Statements are terminated with semi-colon Text strings are enclosed in double quotes C is case sensitive, use lower-case and try not to capitalise variable names Printf() can be used to display text to the screen The curly braces {} define the beginning and end of a program block In C code flexibility. i.e. we can change in the structure of program. 32 reserved words or key words. 27 by dennis and 5 by ANSI Standard.