SlideShare a Scribd company logo
programming language
• programming language is the medium of communication
between you (a person) and a computer system. It is the
set of some instructions written in a specific style (coding)
to instruct the computer to do some specific task
• Types of computer programming languages There are
basically three types of computer programming languages,
they are
• 1. Low level programming languages
• 2. High level programming languages
• 3. Middle level programming languages
programming language
1) Low level programming languages:These are machine dependent
programming languages such as Binary (Machine code) and
Assembly language.
Advantages of machine level language:
• Machine level languages are directly interacting with computer
system.
• There is no requirement of software of conversion like compiler or
interpreters.
• It takes very less time to execute a program, because there is no
conversion take place.
Disadvantages of machine language:
• Its machine dependent language i.e. individual program required for
each machine.
• To develop a program in machine language, it's too hard to
understand and program.
2) Middle Level programming language
• the programming languages which have features of Low Level as
well as High Level programming languages known as "Middle Level"
programming language.
Advantages of Assembly language:
• It is easily understood by human because it is uses statements
instead of binary digits.
• To develop a program it takes less time.
• Debugging and troubleshoot is easy due to easily find error.
Disadvantages of Assembly language:
• It's a machine dependent language due to that program design for
one machine no use of other machine.
• Sometime it's hard to understand the statement or command use.
3) High level programming languages
• High level languages are third generation languages . They are written in
english language. Examples are
• C,C++,JAVACOBOL
Advantages of high level language:
• In this instructions and commands much easier to remember by programmer.
• Its logic and structure are much easier to understand.
• Debugging is easier compare to other languages.
• Less time consuming to writing new programs.
• HLL are described as being portable language.
Disadvantages of high level language:
• HLL programming language take more space compare to other MLL (machine
level language) and/or ALL (Assembly level language).
• This programming language execute slowly.
HISTORY OF C LANGUAGE
• C is a structured programming language developed by Dennis
Ritchie in 1973 at Bell Laboratories. It is one of the most popular
computer languages.
• Clanguage has evolved from three different structured language
ALGOL, BCPL and B
• It uses the many concepts like data types,variables,functions etc.
• Programs written in C language takes very less time to execute and
almost executes at the speed of assembly language instructions.
• Initially C language was mainly used for writing system level
programs, like designing operating systems, but there are other
applications as well which can be very well designed and developed
using C language, like Text Editors, Compilers, Network Drivers etc
HISTORY OF C LANGUAGE
Basic Structure
• C program can be viewed as a group of building
blocks called functions.
• A function is a subroutine that may include one
or more statements designed to perform a
specific task.
• To write a C program, we first create functions
and then put them together.
• A C program may contain one or more sections
Basic Structure
Basic Structure
• 1. Documentation Section This section consists of comment lines which
include the name of the program, the name of the programmer, the
author and other details like time and date of writing the program.
Documentation section helps anyone to get an overview of the program.
• 2. Link Section The link section consists of the header files of the functions
that are used in the program. It provides instructions to the compiler to
link functions from the system library such as using the #include
directive.
• #include<stdio.h> //link section
• #include<conio.h> //link section
• 3. Definition Section All the symbolic constants are written in the
definition section. Macros are known as symbolic constants. #define PI
3.14 //definition section
• 4. Global Declaration Section The global variables that can be used
anywhere in the program are declared in the global declaration section.
This section also declares the user defined functions. float area; //global
Basic Structure
• 5)Funtion prototype and declaration section:
It gives information about the function like return type,parameter
names used inside the functions.
• 6. main() Function Section It is necessary to have one main()
function section in every C program. This section contains two
parts, declaration and executable part. The declaration part
declares all the variables that are used in executable part. These
two parts must be written in between the opening and closing
braces. Each statement in the declaration and executable part
must end with a semicolon (;). The execution of the program
starts at opening braces and ends at closing braces.
• 7)user defined functions: user can define his own funtions
here
Rules to Write a C program
• All lines of C statements must end with a semicolon.
1. C is case-sensitive. That is, uppercase and lowercase
characters are different. Usually, the statements are
typed in lowercase.
2. A C Program statement can be split into many lines
or can be written in one line.
3. Braces must always match upon pairs, i.e., every
opening brace {must have a matching closing brace}.
4. All C program starts with main( ) function.
Ad

More Related Content

Similar to c unit -1. data btypes, variables,operators (20)

week 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptxweek 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptx
nuruddinnnaim
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Manoj Tyagi
 
Intoduction to c language
Intoduction to c languageIntoduction to c language
Intoduction to c language
Student
 
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
WEBSITE DEVELOPMENT
WEBSITE DEVELOPMENTWEBSITE DEVELOPMENT
WEBSITE DEVELOPMENT
shahzadebaujiti
 
Programming in C & Decision Making Branching
Programming in C & Decision Making BranchingProgramming in C & Decision Making Branching
Programming in C & Decision Making Branching
VishnuPriya810389
 
Programming in C and Decision Making Branching
Programming in C and Decision Making BranchingProgramming in C and Decision Making Branching
Programming in C and Decision Making Branching
Rvishnupriya2
 
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptxUnit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
JyotiBadgujar4
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
Alefya1
 
C programming
C programming C programming
C programming
Rohan Gajre
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
C session 1.pptx
C session 1.pptxC session 1.pptx
C session 1.pptx
NIRMALRAJSCSE20
 
INTRO. TO PROG.pptx
INTRO. TO PROG.pptxINTRO. TO PROG.pptx
INTRO. TO PROG.pptx
Samuel Quame
 
Languages in computer
Languages in computerLanguages in computer
Languages in computer
The University of Lahore
 
Problem Solving and Programming using C.pdf
Problem Solving and Programming using C.pdfProblem Solving and Programming using C.pdf
Problem Solving and Programming using C.pdf
PradeepT42
 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptx
AnithaTAssistantProf
 
CS3251-_PIC
CS3251-_PICCS3251-_PIC
CS3251-_PIC
AALIM MUHAMMED SALEGH COLLEGE OF ENGINEERING
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
Suneel Dogra
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 
Programming in c
Programming in cProgramming in c
Programming in c
ankitjain851
 
week 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptxweek 2 - INTRO TO PROGRAMMING.pptx
week 2 - INTRO TO PROGRAMMING.pptx
nuruddinnnaim
 
Introduction to c programming
Introduction to c programmingIntroduction to c programming
Introduction to c programming
Manoj Tyagi
 
Intoduction to c language
Intoduction to c languageIntoduction to c language
Intoduction to c language
Student
 
Fundamentals of Programming language.docx
Fundamentals of Programming language.docxFundamentals of Programming language.docx
Fundamentals of Programming language.docx
bijayakumarsahoo22
 
Programming in C & Decision Making Branching
Programming in C & Decision Making BranchingProgramming in C & Decision Making Branching
Programming in C & Decision Making Branching
VishnuPriya810389
 
Programming in C and Decision Making Branching
Programming in C and Decision Making BranchingProgramming in C and Decision Making Branching
Programming in C and Decision Making Branching
Rvishnupriya2
 
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptxUnit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
Unit 1 CPRsddhcjcjkcjcdjhjkavbasvbasvbkb.pptx
JyotiBadgujar4
 
X-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdfX-CS-8.0 Programming in C Language 2022-2023.pdf
X-CS-8.0 Programming in C Language 2022-2023.pdf
Alefya1
 
POLITEKNIK MALAYSIA
POLITEKNIK MALAYSIAPOLITEKNIK MALAYSIA
POLITEKNIK MALAYSIA
Aiman Hud
 
INTRO. TO PROG.pptx
INTRO. TO PROG.pptxINTRO. TO PROG.pptx
INTRO. TO PROG.pptx
Samuel Quame
 
Problem Solving and Programming using C.pdf
Problem Solving and Programming using C.pdfProblem Solving and Programming using C.pdf
Problem Solving and Programming using C.pdf
PradeepT42
 
Introduction to C Programming Language.pptx
Introduction to C Programming Language.pptxIntroduction to C Programming Language.pptx
Introduction to C Programming Language.pptx
AnithaTAssistantProf
 
Algorithm and flowchart(1)
Algorithm and flowchart(1)Algorithm and flowchart(1)
Algorithm and flowchart(1)
Suneel Dogra
 
Introduction_to_Programming.pptx
Introduction_to_Programming.pptxIntroduction_to_Programming.pptx
Introduction_to_Programming.pptx
PmarkNorcio
 

Recently uploaded (20)

DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Working with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to ImplementationWorking with USDOT UTCs: From Conception to Implementation
Working with USDOT UTCs: From Conception to Implementation
Alabama Transportation Assistance Program
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning ModelsMode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Mode-Wise Corridor Level Travel-Time Estimation Using Machine Learning Models
Journal of Soft Computing in Civil Engineering
 
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Prediction of Flexural Strength of Concrete Produced by Using Pozzolanic Mate...
Journal of Soft Computing in Civil Engineering
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation RateModeling the Influence of Environmental Factors on Concrete Evaporation Rate
Modeling the Influence of Environmental Factors on Concrete Evaporation Rate
Journal of Soft Computing in Civil Engineering
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
DED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedungDED KOMINFO detail engginering design gedung
DED KOMINFO detail engginering design gedung
nabilarizqifadhilah1
 
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdfML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
ML_Unit_VI_DEEP LEARNING_Introduction to ANN.pdf
rameshwarchintamani
 
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdfSmart City is the Future EN - 2024 Thailand Modify V1.0.pdf
Smart City is the Future EN - 2024 Thailand Modify V1.0.pdf
PawachMetharattanara
 
Automatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and BeyondAutomatic Quality Assessment for Speech and Beyond
Automatic Quality Assessment for Speech and Beyond
NU_I_TODALAB
 
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdfATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ATAL 6 Days Online FDP Scheme Document 2025-26.pdf
ssuserda39791
 
Applications of Centroid in Structural Engineering
Applications of Centroid in Structural EngineeringApplications of Centroid in Structural Engineering
Applications of Centroid in Structural Engineering
suvrojyotihalder2006
 
hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .hypermedia_system_revisit_roy_fielding .
hypermedia_system_revisit_roy_fielding .
NABLAS株式会社
 
Machine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATIONMachine Learning basics POWERPOINT PRESENETATION
Machine Learning basics POWERPOINT PRESENETATION
DarrinBright1
 
Slide share PPT of NOx control technologies.pptx
Slide share PPT of  NOx control technologies.pptxSlide share PPT of  NOx control technologies.pptx
Slide share PPT of NOx control technologies.pptx
vvsasane
 
Agents chapter of Artificial intelligence
Agents chapter of Artificial intelligenceAgents chapter of Artificial intelligence
Agents chapter of Artificial intelligence
DebdeepMukherjee9
 
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjjseninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
seninarppt.pptx1bhjiikjhggghjykoirgjuyhhhjj
AjijahamadKhaji
 
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
sss1.pptxsss1.pptxsss1.pptxsss1.pptxsss1.pptx
ajayrm685
 
Control Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptxControl Methods of Noise Pollutions.pptx
Control Methods of Noise Pollutions.pptx
vvsasane
 
2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt2.3 Genetically Modified Organisms (1).ppt
2.3 Genetically Modified Organisms (1).ppt
rakshaiya16
 
introduction technology technology tec.pptx
introduction technology technology tec.pptxintroduction technology technology tec.pptx
introduction technology technology tec.pptx
Iftikhar70
 
Generative AI & Large Language Models Agents
Generative AI & Large Language Models AgentsGenerative AI & Large Language Models Agents
Generative AI & Large Language Models Agents
aasgharbee22seecs
 
Ad

c unit -1. data btypes, variables,operators

  • 1. programming language • programming language is the medium of communication between you (a person) and a computer system. It is the set of some instructions written in a specific style (coding) to instruct the computer to do some specific task • Types of computer programming languages There are basically three types of computer programming languages, they are • 1. Low level programming languages • 2. High level programming languages • 3. Middle level programming languages
  • 2. programming language 1) Low level programming languages:These are machine dependent programming languages such as Binary (Machine code) and Assembly language. Advantages of machine level language: • Machine level languages are directly interacting with computer system. • There is no requirement of software of conversion like compiler or interpreters. • It takes very less time to execute a program, because there is no conversion take place. Disadvantages of machine language: • Its machine dependent language i.e. individual program required for each machine. • To develop a program in machine language, it's too hard to understand and program.
  • 3. 2) Middle Level programming language • the programming languages which have features of Low Level as well as High Level programming languages known as "Middle Level" programming language. Advantages of Assembly language: • It is easily understood by human because it is uses statements instead of binary digits. • To develop a program it takes less time. • Debugging and troubleshoot is easy due to easily find error. Disadvantages of Assembly language: • It's a machine dependent language due to that program design for one machine no use of other machine. • Sometime it's hard to understand the statement or command use.
  • 4. 3) High level programming languages • High level languages are third generation languages . They are written in english language. Examples are • C,C++,JAVACOBOL Advantages of high level language: • In this instructions and commands much easier to remember by programmer. • Its logic and structure are much easier to understand. • Debugging is easier compare to other languages. • Less time consuming to writing new programs. • HLL are described as being portable language. Disadvantages of high level language: • HLL programming language take more space compare to other MLL (machine level language) and/or ALL (Assembly level language). • This programming language execute slowly.
  • 5. HISTORY OF C LANGUAGE • C is a structured programming language developed by Dennis Ritchie in 1973 at Bell Laboratories. It is one of the most popular computer languages. • Clanguage has evolved from three different structured language ALGOL, BCPL and B • It uses the many concepts like data types,variables,functions etc. • Programs written in C language takes very less time to execute and almost executes at the speed of assembly language instructions. • Initially C language was mainly used for writing system level programs, like designing operating systems, but there are other applications as well which can be very well designed and developed using C language, like Text Editors, Compilers, Network Drivers etc
  • 6. HISTORY OF C LANGUAGE
  • 7. Basic Structure • C program can be viewed as a group of building blocks called functions. • A function is a subroutine that may include one or more statements designed to perform a specific task. • To write a C program, we first create functions and then put them together. • A C program may contain one or more sections
  • 9. Basic Structure • 1. Documentation Section This section consists of comment lines which include the name of the program, the name of the programmer, the author and other details like time and date of writing the program. Documentation section helps anyone to get an overview of the program. • 2. Link Section The link section consists of the header files of the functions that are used in the program. It provides instructions to the compiler to link functions from the system library such as using the #include directive. • #include<stdio.h> //link section • #include<conio.h> //link section • 3. Definition Section All the symbolic constants are written in the definition section. Macros are known as symbolic constants. #define PI 3.14 //definition section • 4. Global Declaration Section The global variables that can be used anywhere in the program are declared in the global declaration section. This section also declares the user defined functions. float area; //global
  • 10. Basic Structure • 5)Funtion prototype and declaration section: It gives information about the function like return type,parameter names used inside the functions. • 6. main() Function Section It is necessary to have one main() function section in every C program. This section contains two parts, declaration and executable part. The declaration part declares all the variables that are used in executable part. These two parts must be written in between the opening and closing braces. Each statement in the declaration and executable part must end with a semicolon (;). The execution of the program starts at opening braces and ends at closing braces. • 7)user defined functions: user can define his own funtions here
  • 11. Rules to Write a C program • All lines of C statements must end with a semicolon. 1. C is case-sensitive. That is, uppercase and lowercase characters are different. Usually, the statements are typed in lowercase. 2. A C Program statement can be split into many lines or can be written in one line. 3. Braces must always match upon pairs, i.e., every opening brace {must have a matching closing brace}. 4. All C program starts with main( ) function.
  翻译: