SlideShare uma empresa Scribd logo
1 de 28
Baixar para ler offline
C             Programming
                       Language
               By:
    Yogendra Pal
yogendra@learnbywatch.com
  Dedicated to My mother and Father
t
                                                               y
         Keep your notebook with you.

Write important point and questions that comes in your mind

     Solve Mind band exercise.


                                                               C
                                       Rewind when not clear


              Ask Questions by call or SMS or by mail


Keep Watching Keep Learning

THIS IS INTRODUCTION


                                   2
Computer
• Electronic Device
• Store, Manipulate and Transmit data.
• Data can be
  – Numeric
  – Character (Name, Address etc.)
  – Graphics data (Charts, Photographs, Videos)
  – Sound (Music, Speech etc.)


                           3
Computer…
• Two very important for a programmer
  – Numeric
  – Character
• Scientific and Engineering Applications
  – Numeric
• Business applications
  – Numeric and Character


                            4
Memory
•   Every information is stored in binary code.
•   Binary code is the sequence of 0s and 1s.
•   0 and 1 are called bits.
•   0 represents OFF and 1 represents ON.
•   8 bits makes 1 byte.
            7   6   5   4       3   2   1   0



• Character takes one byte to store.
                            5
Memory…
• Bit is the smallest unit of information storage.
• Bit consists a single binary digit (0 or 1).
• We can interpreted 0 and 1 as:
  – 0 : False : Off
  – 1 : True : On




                          6
Memory…
•   1 bit consists 0 or 1.
•   8 bits makes a byte.
•   210 (1024) byte make a Kilobyte or KB.
•   210 (1024) Kilobyte make a Megabyte or MB.
•   210 (1024) Megabyte make a Gigabyte or GB.
•   210 (1024) Gigabyte make a Terabyte or TB.
            Bit < Byte < KB < MB < GB < TB
                         7
Machine needs instructions


I     o
       ć
             8
Programming Language
• Machine Language
• Assembly Language
• High-Level Language




                        9
Machine Language
• Strings of numbers giving machine specific
  instructions.
• Also known as Machine code.
  Example:
     +1300042774
     +1400593419
     +1200274027




                       10
Machine Language…
• Very Few programs are written in machine
  language because:-
  – It is very difficult to work with machine language.
  – Program written for one type of computer will not
    run on other type of computer (Each type of
    computer has it’s own instruction set).




                           11
Assembly Language
• English-like abbreviations representing
  elementary computer operations.
• Simpler than machine language.
    Example:
           LOAD BASEPAY
           ADD OVERPAY
           STORE GROSSPAY

• Translate in machine code before execute.
• Translation is done by assembler.
                            12
High-level Languages
• Codes similar to everyday English (Easy to
  understand).
• Use mathematical notations.
• Example
  – grossPay = basePay + overTimePay
• Translate in machine code before execute.
• Translation is done by compiler or
  interpreter.

                     13
High level languages…
• The program written in high level language is
  known as source code or source program.
• The compiled source code results in machine-
  language.
• Machine language code is also known as
  object code or object program.



                        14
Compiler vs. Interpreter
• Interpreter reads the source code one line at a
  time convert it into machine code.
• Compiler reads the entire program and
  converts it into machine code.
• machine code is a code that the computer can
  run directly.
• machine code also known as object code or
  binary code.
                        15
Program
• Using programming language we create
  instructions or set of instructions.
• This set of instructions is also knows as
  computer program or software program or
  just program.
• Example programs or softwares:
  – Word processing program
  – Computer Games or video games
                        16
History of C
• Evolved by Dennis Ritchie in 1970 at Bell
  Telephone Laboratories from two previous
  programming languages, BCPL and B.
• Used to develop UNIX.
• Used to write modern operating systems.
• Hardware independent (portable).
• Standard created in 1989, updated in 1999.
      BCPL                  B              C
   Martin Richards     Ken Thompson   Dennis Ritchie


                             17
C: A Middle Level Language
• Best elements of high level language and
  control and flexibility of assembly language.
• C allows the direct manipulation of bits, bytes
  and addresses.
• C has several built in data types.
• Permits type conversion.
• No run time error checking.
• Well suited for system-level programming.
                        18
The C Standard Library
• C programs consist of pieces/modules called
  functions.
  – A programmer can create his own functions.
     • Advantage: the programmer knows exactly how it works
     • Disadvantage: time consuming
  – Programmers will often use the C library
    functions.
     • Use these as building blocks

                            19
C Standard Library…
• Avoid re-inventing the wheel
  – If a premade function exists, generally best to use it
    rather than write your own
  – Library functions carefully written, efficient, and
    portable




                            20
Other High-level Languages
• Other high-level languages
  – FORTRAN
     • Used for scientific and engineering applications
  – COBOL
     • Used to manipulate large amounts of data
  – Pascal
     • Intended for academic use



                               21
Structured Programming
• Disciplined approach to writing programs.
• Functions are the building blocks of programs.
• Allow you to code separate tasks in a program,
  make your program modular.
• Clear, easy to test and debug and easy to
  modify.
• C is a structured programming language.

                       22
Library and Linking
• Library : Collection of functions.
• Linker : Combines the called function object
  code with the code you written.




                        23
Program Development
• Edit        : Program is created in the editor and
                stored on disk.
•   Preprocess: Preprocess program processes the code
•   Compile : Compiler creates object code and stores it
    on disk.
•   Link      : Linker links the object code with the
                libraries.
•   Load      : Loader loads program in memory.
•   Execute : CPU takes each insruction and executes it.

                             24
Form of C program
• The main() function must present in program.
• Keywords can not used as a variable name or a
  function name.
• Case sensitive language.
   – else  ELSE 
• It may have many functions.


                       25
Mind Bend
• Write 4 different data types.
• What is meant by a computer program?
• Differentiate bit & byte?
• What is a machine language? How it is
  different from High level language?
• What are the advantages of high level
  language? Give some examples of high level
  language.

                     26
Mind Bend
•   Differentiate Compiler and Interpreter.
•   What is source program?
•   What is object program?
•   Who develop the C language and where?
•   Can we use uppercase in C program?
•   Computer is an __________ device.
•   Binary code is the sequence of _ & _.
                         27
To get complete benefit solve all the quiz on
                       www.learnbywatch.com

              For any problem in this tutorial mail me at
                    yogendra@learnbywatch.com
                        with the subject “C”

                    For Other information mail at
                      info@learnbywatch.com


Keep Watching Keep Learning

NEXT IS C BASICS

Mais conteúdo relacionado

Mais procurados

High level languages representation
High level languages representationHigh level languages representation
High level languages representationgaurav jain
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer langkapil078
 
Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clSaumya Sahu
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languagessamina khan
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine CodeProject Student
 
Computer Programming: Chapter 1
Computer Programming: Chapter 1Computer Programming: Chapter 1
Computer Programming: Chapter 1Atit Patumvan
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...SHUBHAM PATIDAR FISHERIES ADDAA
 
computer languages
computer languagescomputer languages
computer languagesRajendran
 
What is Higher Language and Lower Language in programming.
What is Higher Language and Lower Language in programming.What is Higher Language and Lower Language in programming.
What is Higher Language and Lower Language in programming.Questpond
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programmingHarithaRanasinghe
 
Machine language
Machine languageMachine language
Machine languageRipal Dhruv
 
Computer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translatorsComputer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translatorsVarshaSivashanker
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresNisarg Amin
 

Mais procurados (20)

High level languages representation
High level languages representationHigh level languages representation
High level languages representation
 
Computer Languages
Computer Languages Computer Languages
Computer Languages
 
Cmp104 lec 6 computer lang
Cmp104 lec 6 computer langCmp104 lec 6 computer lang
Cmp104 lec 6 computer lang
 
Computer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 clComputer Fundamentals Chapter 12 cl
Computer Fundamentals Chapter 12 cl
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 
Assembly and Machine Code
Assembly and Machine CodeAssembly and Machine Code
Assembly and Machine Code
 
Algorithms - Introduction to computer programming
Algorithms - Introduction to computer programmingAlgorithms - Introduction to computer programming
Algorithms - Introduction to computer programming
 
Lecture 8
Lecture 8Lecture 8
Lecture 8
 
Computer Programming: Chapter 1
Computer Programming: Chapter 1Computer Programming: Chapter 1
Computer Programming: Chapter 1
 
Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...Features of machine language, assembly language, high level language & their ...
Features of machine language, assembly language, high level language & their ...
 
Lecture1
Lecture1Lecture1
Lecture1
 
computer languages
computer languagescomputer languages
computer languages
 
Computer languages
Computer languagesComputer languages
Computer languages
 
What is Higher Language and Lower Language in programming.
What is Higher Language and Lower Language in programming.What is Higher Language and Lower Language in programming.
What is Higher Language and Lower Language in programming.
 
Computer Programming - Lecture 1
Computer Programming - Lecture 1Computer Programming - Lecture 1
Computer Programming - Lecture 1
 
Session01 basics programming
Session01 basics programmingSession01 basics programming
Session01 basics programming
 
Machine language
Machine languageMachine language
Machine language
 
Computer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translatorsComputer-charecteristics,types of languages,translators
Computer-charecteristics,types of languages,translators
 
Programming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwaresProgramming languages,compiler,interpreter,softwares
Programming languages,compiler,interpreter,softwares
 
Introduction to programming languages
Introduction to programming languagesIntroduction to programming languages
Introduction to programming languages
 

Destaque

Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingRutvik Pensionwar
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointJavaTpoint.Com
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java SlidesVinit Vyas
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentationelliehood
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGAbhishek Dwivedi
 

Destaque (6)

Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
C Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpointC Programming Language Tutorial for beginners - JavaTpoint
C Programming Language Tutorial for beginners - JavaTpoint
 
Core Java Slides
Core Java SlidesCore Java Slides
Core Java Slides
 
Slideshare Powerpoint presentation
Slideshare Powerpoint presentationSlideshare Powerpoint presentation
Slideshare Powerpoint presentation
 
INTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMINGINTRODUCTION TO C PROGRAMMING
INTRODUCTION TO C PROGRAMMING
 
Slideshare ppt
Slideshare pptSlideshare ppt
Slideshare ppt
 

Semelhante a Introduction to computers

Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programmingMalikaJoya
 
Programing fundamentals with C++
Programing fundamentals with C++Programing fundamentals with C++
Programing fundamentals with C++farooq2016
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptxPmarkNorcio
 
C Programming Lecture 1 - Introduction to C.pptx
C Programming Lecture 1 - Introduction to C.pptxC Programming Lecture 1 - Introduction to C.pptx
C Programming Lecture 1 - Introduction to C.pptxMurali M
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxlematadese670
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming VanessaBuensalida
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computerzaheeriqbal41
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREjatin batra
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfpercivalfernandez2
 
Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxpercivalfernandez3
 

Semelhante a Introduction to computers (20)

Compilers.pptx
Compilers.pptxCompilers.pptx
Compilers.pptx
 
Introduction to C programming
Introduction to C programmingIntroduction to C programming
Introduction to C programming
 
Programing fundamentals with C++
Programing fundamentals with C++Programing fundamentals with C++
Programing fundamentals with C++
 
Unit ii
Unit   iiUnit   ii
Unit ii
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
 
C Programming Lecture 1 - Introduction to C.pptx
C Programming Lecture 1 - Introduction to C.pptxC Programming Lecture 1 - Introduction to C.pptx
C Programming Lecture 1 - Introduction to C.pptx
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptx
 
C language unit-1
C language unit-1C language unit-1
C language unit-1
 
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDYC LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
C LANGUAGE UNIT-1 PREPARED BY M V BRAHMANANDA REDDY
 
C_Programming_Notes_ICE
C_Programming_Notes_ICEC_Programming_Notes_ICE
C_Programming_Notes_ICE
 
programming.pptx
programming.pptxprogramming.pptx
programming.pptx
 
sege.pdf
sege.pdfsege.pdf
sege.pdf
 
Introduction to computer programming
Introduction to computer programming Introduction to computer programming
Introduction to computer programming
 
Introduction to Computer
Introduction to ComputerIntroduction to Computer
Introduction to Computer
 
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTREC & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
C & C++ Training Centre in Ambala! BATRA COMPUTER CENTRE
 
Advance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdfAdvance C# Programming Part 1.pdf
Advance C# Programming Part 1.pdf
 
Chtp401
Chtp401Chtp401
Chtp401
 
chapt_01.pdf
chapt_01.pdfchapt_01.pdf
chapt_01.pdf
 
Plc part 1
Plc part 1Plc part 1
Plc part 1
 
Advance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptxAdvance C# Programming Part 1.pptx
Advance C# Programming Part 1.pptx
 

Mais de Learn By Watch

Demodulation of fm pll detector
Demodulation of fm pll detectorDemodulation of fm pll detector
Demodulation of fm pll detectorLearn By Watch
 
Demodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detectorDemodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detectorLearn By Watch
 
In direct method of fm generation armstrong method
In direct method of fm generation armstrong methodIn direct method of fm generation armstrong method
In direct method of fm generation armstrong methodLearn By Watch
 
Direct method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator methodDirect method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator methodLearn By Watch
 
Spectrum and power of wbfm
Spectrum and power of wbfmSpectrum and power of wbfm
Spectrum and power of wbfmLearn By Watch
 
Narrow band frequency modulation nbfm
Narrow band frequency modulation nbfmNarrow band frequency modulation nbfm
Narrow band frequency modulation nbfmLearn By Watch
 
General expression of fm signal
General expression of fm signalGeneral expression of fm signal
General expression of fm signalLearn By Watch
 
Frequency division multiplexing
Frequency division multiplexingFrequency division multiplexing
Frequency division multiplexingLearn By Watch
 
Demodulation of ssb synchronous detector
Demodulation of ssb synchronous detectorDemodulation of ssb synchronous detector
Demodulation of ssb synchronous detectorLearn By Watch
 
Generarion of ssb phase discrimination method
Generarion of ssb phase discrimination methodGenerarion of ssb phase discrimination method
Generarion of ssb phase discrimination methodLearn By Watch
 
Generarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination methodGenerarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination methodLearn By Watch
 
Demodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiverDemodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiverLearn By Watch
 
Quadrature carrier multiplexing qam
Quadrature carrier multiplexing qamQuadrature carrier multiplexing qam
Quadrature carrier multiplexing qamLearn By Watch
 
Demodulation of am synchronous detector
Demodulation of am synchronous detectorDemodulation of am synchronous detector
Demodulation of am synchronous detectorLearn By Watch
 

Mais de Learn By Watch (20)

Tutorial 9 fm
Tutorial 9 fmTutorial 9 fm
Tutorial 9 fm
 
Phase modulation
Phase modulationPhase modulation
Phase modulation
 
Demodulation of fm pll detector
Demodulation of fm pll detectorDemodulation of fm pll detector
Demodulation of fm pll detector
 
Demodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detectorDemodulation of fm slope and balanced slope detector
Demodulation of fm slope and balanced slope detector
 
In direct method of fm generation armstrong method
In direct method of fm generation armstrong methodIn direct method of fm generation armstrong method
In direct method of fm generation armstrong method
 
Direct method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator methodDirect method of fm generation hartley oscillator method
Direct method of fm generation hartley oscillator method
 
Carson's rule
Carson's ruleCarson's rule
Carson's rule
 
Spectrum and power of wbfm
Spectrum and power of wbfmSpectrum and power of wbfm
Spectrum and power of wbfm
 
Narrow band frequency modulation nbfm
Narrow band frequency modulation nbfmNarrow band frequency modulation nbfm
Narrow band frequency modulation nbfm
 
General expression of fm signal
General expression of fm signalGeneral expression of fm signal
General expression of fm signal
 
Angle modulation
Angle modulationAngle modulation
Angle modulation
 
Frequency division multiplexing
Frequency division multiplexingFrequency division multiplexing
Frequency division multiplexing
 
Vsb modulation
Vsb modulationVsb modulation
Vsb modulation
 
Demodulation of ssb synchronous detector
Demodulation of ssb synchronous detectorDemodulation of ssb synchronous detector
Demodulation of ssb synchronous detector
 
Generarion of ssb phase discrimination method
Generarion of ssb phase discrimination methodGenerarion of ssb phase discrimination method
Generarion of ssb phase discrimination method
 
Generarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination methodGenerarion of ssb frequency discrimination method
Generarion of ssb frequency discrimination method
 
Ssb modulation
Ssb modulationSsb modulation
Ssb modulation
 
Demodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiverDemodulation of dsb sc costas receiver
Demodulation of dsb sc costas receiver
 
Quadrature carrier multiplexing qam
Quadrature carrier multiplexing qamQuadrature carrier multiplexing qam
Quadrature carrier multiplexing qam
 
Demodulation of am synchronous detector
Demodulation of am synchronous detectorDemodulation of am synchronous detector
Demodulation of am synchronous detector
 

Último

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024Janet Corral
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdfSoniaTolstoy
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationnomboosow
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 

Último (20)

Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
General AI for Medical Educators April 2024
General AI for Medical Educators April 2024General AI for Medical Educators April 2024
General AI for Medical Educators April 2024
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdfBASLIQ CURRENT LOOKBOOK  LOOKBOOK(1) (1).pdf
BASLIQ CURRENT LOOKBOOK LOOKBOOK(1) (1).pdf
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Interactive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communicationInteractive Powerpoint_How to Master effective communication
Interactive Powerpoint_How to Master effective communication
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 

Introduction to computers

  • 1. C Programming Language By: Yogendra Pal yogendra@learnbywatch.com Dedicated to My mother and Father
  • 2. t y Keep your notebook with you. Write important point and questions that comes in your mind Solve Mind band exercise. C Rewind when not clear Ask Questions by call or SMS or by mail Keep Watching Keep Learning THIS IS INTRODUCTION 2
  • 3. Computer • Electronic Device • Store, Manipulate and Transmit data. • Data can be – Numeric – Character (Name, Address etc.) – Graphics data (Charts, Photographs, Videos) – Sound (Music, Speech etc.) 3
  • 4. Computer… • Two very important for a programmer – Numeric – Character • Scientific and Engineering Applications – Numeric • Business applications – Numeric and Character 4
  • 5. Memory • Every information is stored in binary code. • Binary code is the sequence of 0s and 1s. • 0 and 1 are called bits. • 0 represents OFF and 1 represents ON. • 8 bits makes 1 byte. 7 6 5 4 3 2 1 0 • Character takes one byte to store. 5
  • 6. Memory… • Bit is the smallest unit of information storage. • Bit consists a single binary digit (0 or 1). • We can interpreted 0 and 1 as: – 0 : False : Off – 1 : True : On 6
  • 7. Memory… • 1 bit consists 0 or 1. • 8 bits makes a byte. • 210 (1024) byte make a Kilobyte or KB. • 210 (1024) Kilobyte make a Megabyte or MB. • 210 (1024) Megabyte make a Gigabyte or GB. • 210 (1024) Gigabyte make a Terabyte or TB. Bit < Byte < KB < MB < GB < TB 7
  • 9. Programming Language • Machine Language • Assembly Language • High-Level Language 9
  • 10. Machine Language • Strings of numbers giving machine specific instructions. • Also known as Machine code. Example: +1300042774 +1400593419 +1200274027 10
  • 11. Machine Language… • Very Few programs are written in machine language because:- – It is very difficult to work with machine language. – Program written for one type of computer will not run on other type of computer (Each type of computer has it’s own instruction set). 11
  • 12. Assembly Language • English-like abbreviations representing elementary computer operations. • Simpler than machine language. Example: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY • Translate in machine code before execute. • Translation is done by assembler. 12
  • 13. High-level Languages • Codes similar to everyday English (Easy to understand). • Use mathematical notations. • Example – grossPay = basePay + overTimePay • Translate in machine code before execute. • Translation is done by compiler or interpreter. 13
  • 14. High level languages… • The program written in high level language is known as source code or source program. • The compiled source code results in machine- language. • Machine language code is also known as object code or object program. 14
  • 15. Compiler vs. Interpreter • Interpreter reads the source code one line at a time convert it into machine code. • Compiler reads the entire program and converts it into machine code. • machine code is a code that the computer can run directly. • machine code also known as object code or binary code. 15
  • 16. Program • Using programming language we create instructions or set of instructions. • This set of instructions is also knows as computer program or software program or just program. • Example programs or softwares: – Word processing program – Computer Games or video games 16
  • 17. History of C • Evolved by Dennis Ritchie in 1970 at Bell Telephone Laboratories from two previous programming languages, BCPL and B. • Used to develop UNIX. • Used to write modern operating systems. • Hardware independent (portable). • Standard created in 1989, updated in 1999. BCPL B C Martin Richards Ken Thompson Dennis Ritchie 17
  • 18. C: A Middle Level Language • Best elements of high level language and control and flexibility of assembly language. • C allows the direct manipulation of bits, bytes and addresses. • C has several built in data types. • Permits type conversion. • No run time error checking. • Well suited for system-level programming. 18
  • 19. The C Standard Library • C programs consist of pieces/modules called functions. – A programmer can create his own functions. • Advantage: the programmer knows exactly how it works • Disadvantage: time consuming – Programmers will often use the C library functions. • Use these as building blocks 19
  • 20. C Standard Library… • Avoid re-inventing the wheel – If a premade function exists, generally best to use it rather than write your own – Library functions carefully written, efficient, and portable 20
  • 21. Other High-level Languages • Other high-level languages – FORTRAN • Used for scientific and engineering applications – COBOL • Used to manipulate large amounts of data – Pascal • Intended for academic use 21
  • 22. Structured Programming • Disciplined approach to writing programs. • Functions are the building blocks of programs. • Allow you to code separate tasks in a program, make your program modular. • Clear, easy to test and debug and easy to modify. • C is a structured programming language. 22
  • 23. Library and Linking • Library : Collection of functions. • Linker : Combines the called function object code with the code you written. 23
  • 24. Program Development • Edit : Program is created in the editor and stored on disk. • Preprocess: Preprocess program processes the code • Compile : Compiler creates object code and stores it on disk. • Link : Linker links the object code with the libraries. • Load : Loader loads program in memory. • Execute : CPU takes each insruction and executes it. 24
  • 25. Form of C program • The main() function must present in program. • Keywords can not used as a variable name or a function name. • Case sensitive language. – else  ELSE  • It may have many functions. 25
  • 26. Mind Bend • Write 4 different data types. • What is meant by a computer program? • Differentiate bit & byte? • What is a machine language? How it is different from High level language? • What are the advantages of high level language? Give some examples of high level language. 26
  • 27. Mind Bend • Differentiate Compiler and Interpreter. • What is source program? • What is object program? • Who develop the C language and where? • Can we use uppercase in C program? • Computer is an __________ device. • Binary code is the sequence of _ & _. 27
  • 28. To get complete benefit solve all the quiz on www.learnbywatch.com For any problem in this tutorial mail me at yogendra@learnbywatch.com with the subject “C” For Other information mail at info@learnbywatch.com Keep Watching Keep Learning NEXT IS C BASICS