340 likes | 1.36k Views
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.
E N D
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 C was used to write many operating systems most part of Unix is written in C
History of C C 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 was originally implemented on a DEC PDP-11 computer in 1972. Dennis_Ritchi C evolved from two previous languages, BCPL and B. BCPL was developed in 1967 by Martin Richards as a language for writing operating-systems software and compilers.
Bell Labs Bell 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-Programming C uses Structured Programming technique Structured Programming Structured programming is an easy and simple technique for writing programs. This technique uses only three types of instructions. Sequential Structure Conditional / Selective Structure Iterative / Repetitive Structure
Sequential Structure Statement 1 Statement 2 Statement 3 Statement 4
Conditional Structure Condition T / F True False Statement 1 Statement 2 Three type of conditions are avalible in C IF IF ELSE Switch
Iterative Structure Condition T / F False Truee Statement(s) Three type of Iterative are avalible in C WHILE DO WHILE FOR
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 preprocessor #include<stdio.h> #include<conio.h> Void main { clrscr(); Int a=5, b=10,sum; printf(“The Sum =%d”,sum=a+b); getch(); } Main function Body of program Variable names C statement Place Holder Data Type
Structure of C program • Summary 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.