SlideShare uma empresa Scribd logo
1 de 17
Introduction to C
software is a collection of programs and a program is a collection of instructions given to the
computer. Development of software is a stepwise process. Before developing a software,
number of processes e done. The first step is to understand the user requirements. Problem
analysis arises during the requirement phase of software development. Problem analysis is
done for obtaining the user requirements and to determine the input and output of the
program. '=or solving the problem, an "algorithm" is implemented. Algorithm is a sequence of
steps that gives ethod of solving a problem. This "algoritnm" creates the logic of program. On
the basis of this -algorithm", program code is written. The steps before writing program .code
are as~
User requirements
Problem analysis t
Input and Output t
Designing algorithm
Program coding
Process of program development
� In earlier days, every language was designed for some specific purpose. For
example FORTRAN (Formula Translator) was used for scientific and mathematical
applications, COBOL (Common Business Oriented Language) was used for
business applications. So need ofsuch a language was felt which could withstand
most of the purposes. "Necessity is the mother of invention". From here the first
step towards C was put forward by Dennis Ritchie.
� The C lalfguage was developed in 1970's at Bell laboratories by Dennis Ritchie.
Initially it was designed for programming in the operating system called UNIX.
After the advent of C, the whole UNIX operating system was rewritten using it.
Now almost tlvc entire UNIX operating system and the tools supplied with it
including the C compiler itself are written in C.
� The C language is derived from the B language, which was written by Ken
Thompson at AT&T Bell laboratories. The B language was adopted from a
language called BCPL (Basic Combined Programming Language), which was
developed by Martin Richards at Cambridge University. In 1982 a committee was
formed by ANSI (American National Standards Institute) to standardize thl C
language. Finally in 1989, the standard for C language was introduced known as
ANSI C. Generall~ most of the modern compilers conform to this standard
History Of C
It is a middle level language. It has the simplicity of a high level language as well
as the power of ; low level language. This asp;ct of C makes it suitabl~ for
writing both application' programs and systen programs. Hence it is an
excellent, efficient and general-purpose language for most of the application I
such as mathematical, scientific, business and system software applications.
C is small language, consisting of only 32 English words known as keywords (if,
else, for, break etc.: The power of C is augmen,ted by the library functions
provided with it. Moreover, the langua'ge i extendible since it allows the users
to add their own library functions to the library.
C contains control constructs needed to write a structured program hence it is
considered a structure programming language. It includes structures for
selection (if.. .else, switch), repetition (while, fo do...while) and for loop exit
(break). . .
The programs w~itten in C aile portable i.e. programs written for one type of
computer or operatin system can be runon anothet type of computer or
operating system
Characteristics of C
Structure of a C Program
� Designing is the first step for obtaining solution of a
given problem. The purpose of designing is to represent
the solution for the system. It is really difficult to
design a large system because the complexity system
cannot be represented easily. So various methods have
been evolved for designing
Design Methods
� every system has several hierarchies of components.
The top-level component represents the whole system.
Top-Down design method starts from top-level
component to lowest level (bottom) component. this
design method, the system is divided into some major
components
Top-Down Design
� Bottom-Up design method is the reverse of Top-Down
approach. It starts from the lowest level component to the
highest-level component. It first designs the basic components
and from these basic components the higher-level components
are designed.
Bottom-Up Design
� It is better to divide a large system into modules. In terms of
programming, module is logically a well defined part of
program. Each module is a separate part of the program. It is
easy to modify a program written with modular approach
because changes in one module don't affect other modules of
program. It is also easy to check bugs in the program in
module level programming
Modular Approach
� Before learning any language, it is important to know
about the various types of languages and their features.
It is interesting to know what were the basic
requirements of the programmers and what difficulties
they faced with the existing languages. The
programming languages can be classified into two
types-
� 1. Low level languages
� 2. High level languages
Programming Languages
The languages in this category are the Machine level
language and Assembly language
1 .Machine Level Language
2.Assembly Language
Low Lev"el Languages
� Computers can understand only digital signals, which are in
binary digits i.e. 0 and 1. So the instruction given to the
computer can be only in binary codes. The machine
language consists of instructions that are in binary 0 or 1.
Computers can understand only machine level language.
� Writing a program in machine level language is a difficult
task because it is not easy for programmed to write
instructions in binary code. A machine level language
program is error-prone and its maintenance is very difficult.
Furthermore machine language programs are not portable.
Every computer has its own machine instructions, so the
programs written for one computer are not valid for other
computers
Machine Level Language
� The difficulties faced in machine level language were reduced to some
extent by using a modified form Of machine level language called
assembly language. In assembly language instructions are given in
English like words, such as MOV, ADD, SUB etc. So it is easier to
write and understand assembly programs, Since a computer can
understand only machine level language, hence assembly language
program must be translated into machine language. The translator that
is used for translating is called "assembler"
� Although writing programs in assembly language is a bit easier, but
still the programmer has to know all the low level details related with
the hardware of a computer. In assembly language, data is stored in
computer registers and each computer has different set of registers.
Hence the assembly language program is also not portable. Since the
low level languages are related with the hardware, hence the execution
of a low-level program is faster.
Assembly Language
� High-level languages are designed keeping in mind the features of
portability i.e. these languages are machine independent. These are English
like languages, so it is easy to write and understand the programs of high-
level language. While programming in a high level language, the
programmer is not concerned with the low level details, and so the whole
attention can be paid to the logic of the problem being solved. For
translating a high-level language program into machine language, compiler
or interpreter is used. Every language has its own compiler or interpreter.
Some languages in this category are- FORTRAN,COBOL, BASIC, Pascal
etc.
High-Level Languages
� We know that computers can understand only machine
level language, which is in binary 1 or O. It is difficult to
write and maintain programs in machine level language. So
the need arises for converting the code of high-level and
low-level languages into machine level language and
translators are used for this purpose. These translators are
just computer programs, which accept a program written in
high level or low-level, language and produce an equivalent
machine language program as output. The three types of
translators used are-
� • Assembler
� • Compiler
� • Interpreter'
Translators
� Assembler is used for converting the code of low-level language (assembly
language) into machine level language
� Compilers and interpreters are used to convert the code of high-level
language into machine language. The high level program is known as
source program and the corresponding machine language program is
known as object program. Although both compiles and interpreters perform
the same task but there is a' difference in their working.
� A compiler searches all the errors of program and lists them. If the program
is error free then it converts the code of program into machine code and
then the program can be executed by separate commands. An interpreter
checks the errors of program statement by statement. After checking one
statement, it converts that statement into machine erode and then executes
that statement. This process continues until the last statement of program or
an erroneous statement occurs
Coun….
The steps for the execution of C program are as-
1. Program creation
2. Program compilation
3. Program execution
� The C programs are written in :mostly two
environments, UNIX and MS-DOS.
Environment For C
Ppt 1

Mais conteúdo relacionado

Mais procurados

Language translator
Language translatorLanguage translator
Language translatorasmakh89
 
Cmp2412 programming principles
Cmp2412 programming principlesCmp2412 programming principles
Cmp2412 programming principlesNIKANOR THOMAS
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigmsJohn Paul Hallasgo
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Arslan Hussain
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpretersRAJU KATHI
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design BasicsAkhil Kaushik
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreterParas Patel
 
Logical programming languages and functional programming languages
Logical programming languages and functional programming languagesLogical programming languages and functional programming languages
Logical programming languages and functional programming languagesnahianzarif
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNSU-Biliran Campus
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingSangheethaa Sukumaran
 

Mais procurados (20)

Unit 1
Unit 1Unit 1
Unit 1
 
Language translator
Language translatorLanguage translator
Language translator
 
Cmp2412 programming principles
Cmp2412 programming principlesCmp2412 programming principles
Cmp2412 programming principles
 
Programming languages and paradigms
Programming languages and paradigmsProgramming languages and paradigms
Programming languages and paradigms
 
Programming Fundamental Slide No.1
Programming Fundamental Slide No.1Programming Fundamental Slide No.1
Programming Fundamental Slide No.1
 
compiler vs interpreter
compiler vs interpretercompiler vs interpreter
compiler vs interpreter
 
Programming languages
Programming languagesProgramming languages
Programming languages
 
Compilers and interpreters
Compilers and interpretersCompilers and interpreters
Compilers and interpreters
 
Computer
ComputerComputer
Computer
 
Algorithms - Introduction to computer programming
Algorithms - Introduction to computer programmingAlgorithms - Introduction to computer programming
Algorithms - Introduction to computer programming
 
Compiler Design Basics
Compiler Design BasicsCompiler Design Basics
Compiler Design Basics
 
Compiler vs interpreter
Compiler vs interpreterCompiler vs interpreter
Compiler vs interpreter
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Interpreted and compiled language
Interpreted and compiled languageInterpreted and compiled language
Interpreted and compiled language
 
Logical programming languages and functional programming languages
Logical programming languages and functional programming languagesLogical programming languages and functional programming languages
Logical programming languages and functional programming languages
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2Fundamentals of Programming Chapter 2
Fundamentals of Programming Chapter 2
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
La5 programming
La5  programmingLa5  programming
La5 programming
 
Introduction to programming
Introduction to programmingIntroduction to programming
Introduction to programming
 

Semelhante a Ppt 1

Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Sehrish Rafiq
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming LanguagesMuhammad Hammad Waseem
 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptxAnithaTAssistantProf
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)Suneel Dogra
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.scHepsijeba
 
Program, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxProgram, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxHariharPaudel1
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and developmentAli Raza
 
Computer languages
Computer languagesComputer languages
Computer languagesPrince Arsal
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)nharsh2308
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptxVishwas459764
 
Computer programming
Computer programmingComputer programming
Computer programmingSuneel Dogra
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programmingNoel Malle
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfSubramanyambharathis
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide shareSudhaa Ravi
 

Semelhante a Ppt 1 (20)

Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12Introduction to Computers Lecture # 12
Introduction to Computers Lecture # 12
 
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
[ITP - Lecture 01] Introduction to Programming & Different Programming Languages
 
C_NOTES.pdf
C_NOTES.pdfC_NOTES.pdf
C_NOTES.pdf
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptx
 
C lecture notes new
C lecture notes newC lecture notes new
C lecture notes new
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
 
Unit i (part2) b.sc
Unit i (part2)   b.scUnit i (part2)   b.sc
Unit i (part2) b.sc
 
Program, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptxProgram, Programming and Programming Language.pptx
Program, Programming and Programming Language.pptx
 
Software programming and development
Software programming and developmentSoftware programming and development
Software programming and development
 
Computer languages
Computer languagesComputer languages
Computer languages
 
Introduction to programming language (basic)
Introduction to programming language (basic)Introduction to programming language (basic)
Introduction to programming language (basic)
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
Chapter 2.pptx
Chapter 2.pptxChapter 2.pptx
Chapter 2.pptx
 
1.Overview of Programming.pptx
1.Overview of Programming.pptx1.Overview of Programming.pptx
1.Overview of Programming.pptx
 
Computer programming
Computer programmingComputer programming
Computer programming
 
Introduction to computer programming
Introduction to computer programmingIntroduction to computer programming
Introduction to computer programming
 
Computer language
Computer languageComputer language
Computer language
 
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdfINTRODUCTION TO C PROGRAMMING MATERIAL.pdf
INTRODUCTION TO C PROGRAMMING MATERIAL.pdf
 
Compiler design slide share
Compiler design slide shareCompiler design slide share
Compiler design slide share
 

Mais de Mohit Saini

Introduction of Basic Excel.pptx
Introduction of Basic Excel.pptxIntroduction of Basic Excel.pptx
Introduction of Basic Excel.pptxMohit Saini
 
Steps to join though google classroom
Steps to join though google classroomSteps to join though google classroom
Steps to join though google classroomMohit Saini
 
Generation of computer
Generation of computerGeneration of computer
Generation of computerMohit Saini
 
Hardware software
Hardware softwareHardware software
Hardware softwareMohit Saini
 
Generation of computer
Generation of computerGeneration of computer
Generation of computerMohit Saini
 
Big data lecture notes
Big data lecture notesBig data lecture notes
Big data lecture notesMohit Saini
 
Computer fundamental
Computer fundamentalComputer fundamental
Computer fundamentalMohit Saini
 
Assignments 150507052746-lva1-app6891
Assignments 150507052746-lva1-app6891Assignments 150507052746-lva1-app6891
Assignments 150507052746-lva1-app6891Mohit Saini
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorialMohit Saini
 

Mais de Mohit Saini (15)

Introduction of Basic Excel.pptx
Introduction of Basic Excel.pptxIntroduction of Basic Excel.pptx
Introduction of Basic Excel.pptx
 
Steps to join though google classroom
Steps to join though google classroomSteps to join though google classroom
Steps to join though google classroom
 
Generation of computer
Generation of computerGeneration of computer
Generation of computer
 
Hardware software
Hardware softwareHardware software
Hardware software
 
Type of coputer
Type of coputerType of coputer
Type of coputer
 
Generation of computer
Generation of computerGeneration of computer
Generation of computer
 
Excel work
Excel workExcel work
Excel work
 
Android
AndroidAndroid
Android
 
Number system
Number systemNumber system
Number system
 
Big data lecture notes
Big data lecture notesBig data lecture notes
Big data lecture notes
 
Ds
DsDs
Ds
 
rdbms-notes
rdbms-notesrdbms-notes
rdbms-notes
 
Computer fundamental
Computer fundamentalComputer fundamental
Computer fundamental
 
Assignments 150507052746-lva1-app6891
Assignments 150507052746-lva1-app6891Assignments 150507052746-lva1-app6891
Assignments 150507052746-lva1-app6891
 
C programming tutorial
C programming tutorialC programming tutorial
C programming tutorial
 

Último

TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catcherssdickerson1
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptNarmatha D
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsSachinPawar510423
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfRajuKanojiya4
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating SystemRashmi Bhat
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxk795866
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)Dr SOUNDIRARAJ N
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsDILIPKUMARMONDAL6
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating SystemRashmi Bhat
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girlsssuser7cb4ff
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadaditya806802
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxRomil Mishra
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...Amil Baba Dawood bangali
 

Último (20)

TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor CatchersTechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
TechTAC® CFD Report Summary: A Comparison of Two Types of Tubing Anchor Catchers
 
Industrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.pptIndustrial Safety Unit-IV workplace health and safety.ppt
Industrial Safety Unit-IV workplace health and safety.ppt
 
Vishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documentsVishratwadi & Ghorpadi Bridge Tender documents
Vishratwadi & Ghorpadi Bridge Tender documents
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
National Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdfNational Level Hackathon Participation Certificate.pdf
National Level Hackathon Participation Certificate.pdf
 
Main Memory Management in Operating System
Main Memory Management in Operating SystemMain Memory Management in Operating System
Main Memory Management in Operating System
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
Introduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptxIntroduction-To-Agricultural-Surveillance-Rover.pptx
Introduction-To-Agricultural-Surveillance-Rover.pptx
 
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
UNIT III ANALOG ELECTRONICS (BASIC ELECTRONICS)
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 
The SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teamsThe SRE Report 2024 - Great Findings for the teams
The SRE Report 2024 - Great Findings for the teams
 
Input Output Management in Operating System
Input Output Management in Operating SystemInput Output Management in Operating System
Input Output Management in Operating System
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Call Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call GirlsCall Girls Narol 7397865700 Independent Call Girls
Call Girls Narol 7397865700 Independent Call Girls
 
home automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasadhome automation using Arduino by Aditya Prasad
home automation using Arduino by Aditya Prasad
 
Mine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptxMine Environment II Lab_MI10448MI__________.pptx
Mine Environment II Lab_MI10448MI__________.pptx
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
NO1 Certified Black Magic Specialist Expert Amil baba in Uae Dubai Abu Dhabi ...
 

Ppt 1

  • 1. Introduction to C software is a collection of programs and a program is a collection of instructions given to the computer. Development of software is a stepwise process. Before developing a software, number of processes e done. The first step is to understand the user requirements. Problem analysis arises during the requirement phase of software development. Problem analysis is done for obtaining the user requirements and to determine the input and output of the program. '=or solving the problem, an "algorithm" is implemented. Algorithm is a sequence of steps that gives ethod of solving a problem. This "algoritnm" creates the logic of program. On the basis of this -algorithm", program code is written. The steps before writing program .code are as~ User requirements Problem analysis t Input and Output t Designing algorithm Program coding Process of program development
  • 2. � In earlier days, every language was designed for some specific purpose. For example FORTRAN (Formula Translator) was used for scientific and mathematical applications, COBOL (Common Business Oriented Language) was used for business applications. So need ofsuch a language was felt which could withstand most of the purposes. "Necessity is the mother of invention". From here the first step towards C was put forward by Dennis Ritchie. � The C lalfguage was developed in 1970's at Bell laboratories by Dennis Ritchie. Initially it was designed for programming in the operating system called UNIX. After the advent of C, the whole UNIX operating system was rewritten using it. Now almost tlvc entire UNIX operating system and the tools supplied with it including the C compiler itself are written in C. � The C language is derived from the B language, which was written by Ken Thompson at AT&T Bell laboratories. The B language was adopted from a language called BCPL (Basic Combined Programming Language), which was developed by Martin Richards at Cambridge University. In 1982 a committee was formed by ANSI (American National Standards Institute) to standardize thl C language. Finally in 1989, the standard for C language was introduced known as ANSI C. Generall~ most of the modern compilers conform to this standard History Of C
  • 3. It is a middle level language. It has the simplicity of a high level language as well as the power of ; low level language. This asp;ct of C makes it suitabl~ for writing both application' programs and systen programs. Hence it is an excellent, efficient and general-purpose language for most of the application I such as mathematical, scientific, business and system software applications. C is small language, consisting of only 32 English words known as keywords (if, else, for, break etc.: The power of C is augmen,ted by the library functions provided with it. Moreover, the langua'ge i extendible since it allows the users to add their own library functions to the library. C contains control constructs needed to write a structured program hence it is considered a structure programming language. It includes structures for selection (if.. .else, switch), repetition (while, fo do...while) and for loop exit (break). . . The programs w~itten in C aile portable i.e. programs written for one type of computer or operatin system can be runon anothet type of computer or operating system Characteristics of C
  • 4. Structure of a C Program
  • 5. � Designing is the first step for obtaining solution of a given problem. The purpose of designing is to represent the solution for the system. It is really difficult to design a large system because the complexity system cannot be represented easily. So various methods have been evolved for designing Design Methods
  • 6. � every system has several hierarchies of components. The top-level component represents the whole system. Top-Down design method starts from top-level component to lowest level (bottom) component. this design method, the system is divided into some major components Top-Down Design
  • 7. � Bottom-Up design method is the reverse of Top-Down approach. It starts from the lowest level component to the highest-level component. It first designs the basic components and from these basic components the higher-level components are designed. Bottom-Up Design
  • 8. � It is better to divide a large system into modules. In terms of programming, module is logically a well defined part of program. Each module is a separate part of the program. It is easy to modify a program written with modular approach because changes in one module don't affect other modules of program. It is also easy to check bugs in the program in module level programming Modular Approach
  • 9. � Before learning any language, it is important to know about the various types of languages and their features. It is interesting to know what were the basic requirements of the programmers and what difficulties they faced with the existing languages. The programming languages can be classified into two types- � 1. Low level languages � 2. High level languages Programming Languages
  • 10. The languages in this category are the Machine level language and Assembly language 1 .Machine Level Language 2.Assembly Language Low Lev"el Languages
  • 11. � Computers can understand only digital signals, which are in binary digits i.e. 0 and 1. So the instruction given to the computer can be only in binary codes. The machine language consists of instructions that are in binary 0 or 1. Computers can understand only machine level language. � Writing a program in machine level language is a difficult task because it is not easy for programmed to write instructions in binary code. A machine level language program is error-prone and its maintenance is very difficult. Furthermore machine language programs are not portable. Every computer has its own machine instructions, so the programs written for one computer are not valid for other computers Machine Level Language
  • 12. � The difficulties faced in machine level language were reduced to some extent by using a modified form Of machine level language called assembly language. In assembly language instructions are given in English like words, such as MOV, ADD, SUB etc. So it is easier to write and understand assembly programs, Since a computer can understand only machine level language, hence assembly language program must be translated into machine language. The translator that is used for translating is called "assembler" � Although writing programs in assembly language is a bit easier, but still the programmer has to know all the low level details related with the hardware of a computer. In assembly language, data is stored in computer registers and each computer has different set of registers. Hence the assembly language program is also not portable. Since the low level languages are related with the hardware, hence the execution of a low-level program is faster. Assembly Language
  • 13. � High-level languages are designed keeping in mind the features of portability i.e. these languages are machine independent. These are English like languages, so it is easy to write and understand the programs of high- level language. While programming in a high level language, the programmer is not concerned with the low level details, and so the whole attention can be paid to the logic of the problem being solved. For translating a high-level language program into machine language, compiler or interpreter is used. Every language has its own compiler or interpreter. Some languages in this category are- FORTRAN,COBOL, BASIC, Pascal etc. High-Level Languages
  • 14. � We know that computers can understand only machine level language, which is in binary 1 or O. It is difficult to write and maintain programs in machine level language. So the need arises for converting the code of high-level and low-level languages into machine level language and translators are used for this purpose. These translators are just computer programs, which accept a program written in high level or low-level, language and produce an equivalent machine language program as output. The three types of translators used are- � • Assembler � • Compiler � • Interpreter' Translators
  • 15. � Assembler is used for converting the code of low-level language (assembly language) into machine level language � Compilers and interpreters are used to convert the code of high-level language into machine language. The high level program is known as source program and the corresponding machine language program is known as object program. Although both compiles and interpreters perform the same task but there is a' difference in their working. � A compiler searches all the errors of program and lists them. If the program is error free then it converts the code of program into machine code and then the program can be executed by separate commands. An interpreter checks the errors of program statement by statement. After checking one statement, it converts that statement into machine erode and then executes that statement. This process continues until the last statement of program or an erroneous statement occurs Coun….
  • 16. The steps for the execution of C program are as- 1. Program creation 2. Program compilation 3. Program execution � The C programs are written in :mostly two environments, UNIX and MS-DOS. Environment For C