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
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
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
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
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
Sequential Structure
Statement 1
Statement 2
Statement 3
Statement 4
Conditional Structure
ConditionT / F
Statement 1 Statement 2
True False
Three type of conditions are avalible in C
IF IF ELSE Switch
Iterative Structure
ConditionT / F
Statement(s)
Truee
False
Three type of Iterative are avalible in C
WHILE FORDO WHILE
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
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
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.