SlideShare a Scribd company logo
Welcome to lectureWelcome to lecture
4……….4……….
//email us at:umairnsr87@gmail.com//email us at:umairnsr87@gmail.com
//contact no:09045562429//contact no:09045562429
Topics to beTopics to be
covered……..covered……..
 Compiling our first programCompiling our first program
 Introduction to variables and expressionsIntroduction to variables and expressions
 Character setCharacter set
 IdentifiersIdentifiers
 KeywordsKeywords
 VariablesVariables
 ConstantsConstants
 ExpressionsExpressions
Compiling our firstCompiling our first
program…..program…..
Introduction toIntroduction to
variables andvariables and
expressionsexpressions
Character set……..Character set……..
Data types……….Data types……….
Identifiers ……….Identifiers ……….
 In C language identifiers are the names given to variables, constants,In C language identifiers are the names given to variables, constants,
functions and user-define data. These identifier are defined against afunctions and user-define data. These identifier are defined against a
set of rules.set of rules.
 Rules for an IdentifierRules for an Identifier
 An Identifier can only have alphanumeric characters( a-z , A-Z , 0-9 )An Identifier can only have alphanumeric characters( a-z , A-Z , 0-9 )
and underscore( _ ).and underscore( _ ).
 The first character of an identifier can only contain alphabet( a-z , A-ZThe first character of an identifier can only contain alphabet( a-z , A-Z
) or underscore ( _ ).) or underscore ( _ ).
 Identifiers are also case sensitive in C. ForIdentifiers are also case sensitive in C. For
exampleexample namename andand NameName are two different identifier in C.are two different identifier in C.
 Keywords are not allowed to be used as Identifiers.Keywords are not allowed to be used as Identifiers.
 No special characters, such as semicolon, period, whitespaces, slashNo special characters, such as semicolon, period, whitespaces, slash
or comma are permitted to be used in or as Identifier.or comma are permitted to be used in or as Identifier.
 example-sum, Sum, _sum.example-sum, Sum, _sum.
Keywords………..Keywords………..
 Keywords are preserved words that haveKeywords are preserved words that have
special meaning in C language. The meaningspecial meaning in C language. The meaning
has already been described. These meaninghas already been described. These meaning
cannot be changed. There are total 32cannot be changed. There are total 32
keywords in C language.keywords in C language.
 Auto, double, int, struct, break, else, long,Auto, double, int, struct, break, else, long,
switch, case, enum , register, typedef , const,switch, case, enum , register, typedef , const,
extern, return, union, char ,float ,shortextern, return, union, char ,float ,short
,unsigned ,continue ,for ,signed ,volatile,unsigned ,continue ,for ,signed ,volatile
,default ,goto ,sizeof ,void ,do ,if, static, while.,default ,goto ,sizeof ,void ,do ,if, static, while.
Variables…….Variables…….
 a data item that may take on more thana data item that may take on more than
one value during the runtime of aone value during the runtime of a
program.program.
 Variables point to the memory locationVariables point to the memory location
which can be further changed or modifieswhich can be further changed or modifies
according to the need of program.according to the need of program.
 Declaration: int x; char a; float p;Declaration: int x; char a; float p;
Constants………Constants………
 Constants are those value which remainsConstants are those value which remains
same through out the program.same through out the program.
 They can also be defined before mainThey can also be defined before main
function by using #define pie 3.14function by using #define pie 3.14
 Eg- float pie=3.14;Eg- float pie=3.14;
To be continued inTo be continued in
lecture 5………lecture 5………
//email us//email us
at:umairnsr87@gmail.comat:umairnsr87@gmail.com
//contact no:09045562429//contact no:09045562429

More Related Content

What's hot

(2) cpp imperative programming
(2) cpp imperative programming(2) cpp imperative programming
(2) cpp imperative programming
Nico Ludwig
 
Unit 1 question and answer
Unit 1 question and answerUnit 1 question and answer
Unit 1 question and answer
Vasuki Ramasamy
 
Lecture 2
Lecture 2Lecture 2
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020
VigneshVijay21
 
Java unit 2
Java unit 2Java unit 2
Java unit 2
Shipra Swati
 
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++  Langauage Training in Ambala ! BATRA COMPUTER CENTREC++  Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
jatin batra
 
8 issues in pos tagging
8 issues in pos tagging8 issues in pos tagging
8 issues in pos tagging
ThennarasuSakkan
 
PL Lecture 03 - Types
PL Lecture 03 - TypesPL Lecture 03 - Types
PL Lecture 03 - Types
Schwannden Kuo
 
Identifiers and keywords
Identifiers and keywordsIdentifiers and keywords
Identifiers and keywords
Logicinprogramming
 
Lec 08. C Data Types
Lec 08. C Data TypesLec 08. C Data Types
Lec 08. C Data TypesRushdi Shams
 
Coding & Decoding Reasoning Tricks
Coding & Decoding Reasoning TricksCoding & Decoding Reasoning Tricks
Coding & Decoding Reasoning Tricks
sakshi
 
Coding Decoding Reasoning Tricks for Competitive Exams
Coding Decoding Reasoning Tricks for Competitive ExamsCoding Decoding Reasoning Tricks for Competitive Exams
Coding Decoding Reasoning Tricks for Competitive Exams
Entrance Exam Info
 
Lec 13. Introduction to Pointers
Lec 13. Introduction to PointersLec 13. Introduction to Pointers
Lec 13. Introduction to PointersRushdi Shams
 
2.coding decoding
2.coding decoding2.coding decoding
2.coding decoding
Saurabh Trivedi
 
C++
C++C++
How to solve problems of coding decoding?
How to solve problems of coding decoding?How to solve problems of coding decoding?
How to solve problems of coding decoding?
sakshi
 

What's hot (20)

(2) cpp imperative programming
(2) cpp imperative programming(2) cpp imperative programming
(2) cpp imperative programming
 
Unit 1 question and answer
Unit 1 question and answerUnit 1 question and answer
Unit 1 question and answer
 
Parsing
ParsingParsing
Parsing
 
Lec9
Lec9Lec9
Lec9
 
Data type
Data typeData type
Data type
 
Csharp4 basics
Csharp4 basicsCsharp4 basics
Csharp4 basics
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Python Interview questions 2020
Python Interview questions 2020Python Interview questions 2020
Python Interview questions 2020
 
Java unit 2
Java unit 2Java unit 2
Java unit 2
 
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++  Langauage Training in Ambala ! BATRA COMPUTER CENTREC++  Langauage Training in Ambala ! BATRA COMPUTER CENTRE
C++ Langauage Training in Ambala ! BATRA COMPUTER CENTRE
 
8 issues in pos tagging
8 issues in pos tagging8 issues in pos tagging
8 issues in pos tagging
 
PL Lecture 03 - Types
PL Lecture 03 - TypesPL Lecture 03 - Types
PL Lecture 03 - Types
 
Identifiers and keywords
Identifiers and keywordsIdentifiers and keywords
Identifiers and keywords
 
Lec 08. C Data Types
Lec 08. C Data TypesLec 08. C Data Types
Lec 08. C Data Types
 
Coding & Decoding Reasoning Tricks
Coding & Decoding Reasoning TricksCoding & Decoding Reasoning Tricks
Coding & Decoding Reasoning Tricks
 
Coding Decoding Reasoning Tricks for Competitive Exams
Coding Decoding Reasoning Tricks for Competitive ExamsCoding Decoding Reasoning Tricks for Competitive Exams
Coding Decoding Reasoning Tricks for Competitive Exams
 
Lec 13. Introduction to Pointers
Lec 13. Introduction to PointersLec 13. Introduction to Pointers
Lec 13. Introduction to Pointers
 
2.coding decoding
2.coding decoding2.coding decoding
2.coding decoding
 
C++
C++C++
C++
 
How to solve problems of coding decoding?
How to solve problems of coding decoding?How to solve problems of coding decoding?
How to solve problems of coding decoding?
 

Viewers also liked

Joseph Grant HRM Resume
Joseph Grant HRM ResumeJoseph Grant HRM Resume
Joseph Grant HRM ResumeJoseph Grant
 
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_franceza
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_francezaNICOLAE_BUBUI-RO-BUC_2015-ok_soc_franceza
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_francezaNicolae Bubui
 
The Resume
The ResumeThe Resume
The Resume
macdonaldlacey
 
холодное+сердце
холодное+сердцехолодное+сердце
холодное+сердце
mediadis
 
Final new
Final newFinal new
Final new
mediadis
 
Данные Tns россия о российском рынке печатных сми
Данные Tns россия о российском рынке печатных смиДанные Tns россия о российском рынке печатных сми
Данные Tns россия о российском рынке печатных сми
mediadis
 
Wow
WowWow

Viewers also liked (9)

Joseph Grant HRM Resume
Joseph Grant HRM ResumeJoseph Grant HRM Resume
Joseph Grant HRM Resume
 
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_franceza
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_francezaNICOLAE_BUBUI-RO-BUC_2015-ok_soc_franceza
NICOLAE_BUBUI-RO-BUC_2015-ok_soc_franceza
 
The Resume
The ResumeThe Resume
The Resume
 
Facory rooms
Facory roomsFacory rooms
Facory rooms
 
Politicas de compra
Politicas de compraPoliticas de compra
Politicas de compra
 
холодное+сердце
холодное+сердцехолодное+сердце
холодное+сердце
 
Final new
Final newFinal new
Final new
 
Данные Tns россия о российском рынке печатных сми
Данные Tns россия о российском рынке печатных смиДанные Tns россия о российском рынке печатных сми
Данные Tns россия о российском рынке печатных сми
 
Wow
WowWow
Wow
 

Similar to Welcome to lecture 4 in c programming

C tokens
C tokensC tokens
C tokens
Megha Sharma
 
C programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer CentreC programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer Centre
jatin batra
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic conceptsAbhinav Vatsa
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
sunilchute1
 
C language ppt
C language pptC language ppt
C language ppt
Ğäùråv Júñêjå
 
Tokens In C.pdf
Tokens In C.pdfTokens In C.pdf
Tokens In C.pdf
Gimnoy
 
Interview Questions For C Language
Interview Questions For C Language Interview Questions For C Language
Interview Questions For C Language
Rowank2
 
Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)
Unviersity of balochistan quetta
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptx
Rowank2
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
arpanabharani
 
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
Rowank2
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
Tanishq Soni
 
C programming session7
C programming  session7C programming  session7
C programming session7
Keroles karam khalil
 
C programming session7
C programming  session7C programming  session7
C programming session7
Keroles karam khalil
 
Lecture 2 keyword of C Programming Language
Lecture 2 keyword of C Programming LanguageLecture 2 keyword of C Programming Language
Lecture 2 keyword of C Programming Language
SURAJ KUMAR
 
Basics of c
Basics of cBasics of c
Basics of c
vinothini1996
 
Aniket tore
Aniket toreAniket tore
Aniket tore
anikettore1
 
Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4
Mohd Harris Ahmad Jaal
 

Similar to Welcome to lecture 4 in c programming (20)

C tokens
C tokensC tokens
C tokens
 
C programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer CentreC programming Training in Ambala ! Batra Computer Centre
C programming Training in Ambala ! Batra Computer Centre
 
C the basic concepts
C the basic conceptsC the basic concepts
C the basic concepts
 
Programming construction tools
Programming construction toolsProgramming construction tools
Programming construction tools
 
C language ppt
C language pptC language ppt
C language ppt
 
Tokens In C.pdf
Tokens In C.pdfTokens In C.pdf
Tokens In C.pdf
 
Interview Questions For C Language
Interview Questions For C Language Interview Questions For C Language
Interview Questions For C Language
 
Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)Let's us c language (sabeel Bugti)
Let's us c language (sabeel Bugti)
 
Interview Questions For C Language .pptx
Interview Questions For C Language .pptxInterview Questions For C Language .pptx
Interview Questions For C Language .pptx
 
history of c.ppt
history of c.ppthistory of c.ppt
history of c.ppt
 
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
C Language Interview Questions: Data Types, Pointers, Data Structures, Memory...
 
C language
C languageC language
C language
 
Literals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiersLiterals, primitive datatypes, variables, expressions, identifiers
Literals, primitive datatypes, variables, expressions, identifiers
 
C programming session7
C programming  session7C programming  session7
C programming session7
 
C programming session7
C programming  session7C programming  session7
C programming session7
 
Lecture 2 keyword of C Programming Language
Lecture 2 keyword of C Programming LanguageLecture 2 keyword of C Programming Language
Lecture 2 keyword of C Programming Language
 
Basics of c
Basics of cBasics of c
Basics of c
 
C notes
C notesC notes
C notes
 
Aniket tore
Aniket toreAniket tore
Aniket tore
 
Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4Fundamentals of Programming Chapter 4
Fundamentals of Programming Chapter 4
 

Recently uploaded

2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
johnmarimigallon
 
A proposed request for information on LIHTC
A proposed request for information on LIHTCA proposed request for information on LIHTC
A proposed request for information on LIHTC
Roger Valdez
 
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Congressional Budget Office
 
Opinions on EVs: Metro Atlanta Speaks 2023
Opinions on EVs: Metro Atlanta Speaks 2023Opinions on EVs: Metro Atlanta Speaks 2023
Opinions on EVs: Metro Atlanta Speaks 2023
ARCResearch
 
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptxPD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
RIDPRO11
 
kupon sample qurban masjid indonesia terbaru.pptx
kupon sample qurban masjid indonesia terbaru.pptxkupon sample qurban masjid indonesia terbaru.pptx
kupon sample qurban masjid indonesia terbaru.pptx
viderakai
 
2024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 372024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 37
JSchaus & Associates
 
Government Service OPSI Playbook FINAL.pdf
Government Service OPSI Playbook FINAL.pdfGovernment Service OPSI Playbook FINAL.pdf
Government Service OPSI Playbook FINAL.pdf
MoffatNyamadzawo2
 
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
Congressional Budget Office
 
NHAI_Under_Implementation_01-05-2024.pdf
NHAI_Under_Implementation_01-05-2024.pdfNHAI_Under_Implementation_01-05-2024.pdf
NHAI_Under_Implementation_01-05-2024.pdf
AjayVejendla3
 
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHO
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHOMonitoring Health for the SDGs - Global Health Statistics 2024 - WHO
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHO
Christina Parmionova
 
Uniform Guidance 3.0 - The New 2 CFR 200
Uniform Guidance 3.0 - The New 2 CFR 200Uniform Guidance 3.0 - The New 2 CFR 200
Uniform Guidance 3.0 - The New 2 CFR 200
GrantManagementInsti
 
Get Government Grants and Assistance Program
Get Government Grants and Assistance ProgramGet Government Grants and Assistance Program
Get Government Grants and Assistance Program
Get Government Grants
 
Understanding the Challenges of Street Children
Understanding the Challenges of Street ChildrenUnderstanding the Challenges of Street Children
Understanding the Challenges of Street Children
SERUDS INDIA
 
Transit-Oriented Development Study Working Group Meeting
Transit-Oriented Development Study Working Group MeetingTransit-Oriented Development Study Working Group Meeting
Transit-Oriented Development Study Working Group Meeting
Cuyahoga County Planning Commission
 
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdfPNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
ClaudioTebaldi2
 
2024: The FAR - Federal Acquisition Regulations, Part 38
2024: The FAR - Federal Acquisition Regulations, Part 382024: The FAR - Federal Acquisition Regulations, Part 38
2024: The FAR - Federal Acquisition Regulations, Part 38
JSchaus & Associates
 
State crafting: Changes and challenges for managing the public finances
State crafting: Changes and challenges for managing the public financesState crafting: Changes and challenges for managing the public finances
State crafting: Changes and challenges for managing the public finances
ResolutionFoundation
 
ZGB - The Role of Generative AI in Government transformation.pdf
ZGB - The Role of Generative AI in Government transformation.pdfZGB - The Role of Generative AI in Government transformation.pdf
ZGB - The Role of Generative AI in Government transformation.pdf
Saeed Al Dhaheri
 
Donate to charity during this holiday season
Donate to charity during this holiday seasonDonate to charity during this holiday season
Donate to charity during this holiday season
SERUDS INDIA
 

Recently uploaded (20)

2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
2017 Omnibus Rules on Appointments and Other Human Resource Actions, As Amended
 
A proposed request for information on LIHTC
A proposed request for information on LIHTCA proposed request for information on LIHTC
A proposed request for information on LIHTC
 
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
Effects of Extreme Temperatures From Climate Change on the Medicare Populatio...
 
Opinions on EVs: Metro Atlanta Speaks 2023
Opinions on EVs: Metro Atlanta Speaks 2023Opinions on EVs: Metro Atlanta Speaks 2023
Opinions on EVs: Metro Atlanta Speaks 2023
 
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptxPD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
PD-1602-as-amended-by-RA-9287-Anti-Illegal-Gambling-Law.pptx
 
kupon sample qurban masjid indonesia terbaru.pptx
kupon sample qurban masjid indonesia terbaru.pptxkupon sample qurban masjid indonesia terbaru.pptx
kupon sample qurban masjid indonesia terbaru.pptx
 
2024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 372024: The FAR - Federal Acquisition Regulations, Part 37
2024: The FAR - Federal Acquisition Regulations, Part 37
 
Government Service OPSI Playbook FINAL.pdf
Government Service OPSI Playbook FINAL.pdfGovernment Service OPSI Playbook FINAL.pdf
Government Service OPSI Playbook FINAL.pdf
 
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
CBO’s Outlook for U.S. Fertility Rates: 2024 to 2054
 
NHAI_Under_Implementation_01-05-2024.pdf
NHAI_Under_Implementation_01-05-2024.pdfNHAI_Under_Implementation_01-05-2024.pdf
NHAI_Under_Implementation_01-05-2024.pdf
 
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHO
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHOMonitoring Health for the SDGs - Global Health Statistics 2024 - WHO
Monitoring Health for the SDGs - Global Health Statistics 2024 - WHO
 
Uniform Guidance 3.0 - The New 2 CFR 200
Uniform Guidance 3.0 - The New 2 CFR 200Uniform Guidance 3.0 - The New 2 CFR 200
Uniform Guidance 3.0 - The New 2 CFR 200
 
Get Government Grants and Assistance Program
Get Government Grants and Assistance ProgramGet Government Grants and Assistance Program
Get Government Grants and Assistance Program
 
Understanding the Challenges of Street Children
Understanding the Challenges of Street ChildrenUnderstanding the Challenges of Street Children
Understanding the Challenges of Street Children
 
Transit-Oriented Development Study Working Group Meeting
Transit-Oriented Development Study Working Group MeetingTransit-Oriented Development Study Working Group Meeting
Transit-Oriented Development Study Working Group Meeting
 
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdfPNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
PNRR MADRID GREENTECH FOR BROWN NETWORKS NETWORKS MUR_MUSA_TEBALDI.pdf
 
2024: The FAR - Federal Acquisition Regulations, Part 38
2024: The FAR - Federal Acquisition Regulations, Part 382024: The FAR - Federal Acquisition Regulations, Part 38
2024: The FAR - Federal Acquisition Regulations, Part 38
 
State crafting: Changes and challenges for managing the public finances
State crafting: Changes and challenges for managing the public financesState crafting: Changes and challenges for managing the public finances
State crafting: Changes and challenges for managing the public finances
 
ZGB - The Role of Generative AI in Government transformation.pdf
ZGB - The Role of Generative AI in Government transformation.pdfZGB - The Role of Generative AI in Government transformation.pdf
ZGB - The Role of Generative AI in Government transformation.pdf
 
Donate to charity during this holiday season
Donate to charity during this holiday seasonDonate to charity during this holiday season
Donate to charity during this holiday season
 

Welcome to lecture 4 in c programming

  • 1. Welcome to lectureWelcome to lecture 4……….4………. //email us at:umairnsr87@gmail.com//email us at:umairnsr87@gmail.com //contact no:09045562429//contact no:09045562429
  • 2. Topics to beTopics to be covered……..covered……..  Compiling our first programCompiling our first program  Introduction to variables and expressionsIntroduction to variables and expressions  Character setCharacter set  IdentifiersIdentifiers  KeywordsKeywords  VariablesVariables  ConstantsConstants  ExpressionsExpressions
  • 3. Compiling our firstCompiling our first program…..program…..
  • 4. Introduction toIntroduction to variables andvariables and expressionsexpressions
  • 7. Identifiers ……….Identifiers ……….  In C language identifiers are the names given to variables, constants,In C language identifiers are the names given to variables, constants, functions and user-define data. These identifier are defined against afunctions and user-define data. These identifier are defined against a set of rules.set of rules.  Rules for an IdentifierRules for an Identifier  An Identifier can only have alphanumeric characters( a-z , A-Z , 0-9 )An Identifier can only have alphanumeric characters( a-z , A-Z , 0-9 ) and underscore( _ ).and underscore( _ ).  The first character of an identifier can only contain alphabet( a-z , A-ZThe first character of an identifier can only contain alphabet( a-z , A-Z ) or underscore ( _ ).) or underscore ( _ ).  Identifiers are also case sensitive in C. ForIdentifiers are also case sensitive in C. For exampleexample namename andand NameName are two different identifier in C.are two different identifier in C.  Keywords are not allowed to be used as Identifiers.Keywords are not allowed to be used as Identifiers.  No special characters, such as semicolon, period, whitespaces, slashNo special characters, such as semicolon, period, whitespaces, slash or comma are permitted to be used in or as Identifier.or comma are permitted to be used in or as Identifier.  example-sum, Sum, _sum.example-sum, Sum, _sum.
  • 8. Keywords………..Keywords………..  Keywords are preserved words that haveKeywords are preserved words that have special meaning in C language. The meaningspecial meaning in C language. The meaning has already been described. These meaninghas already been described. These meaning cannot be changed. There are total 32cannot be changed. There are total 32 keywords in C language.keywords in C language.  Auto, double, int, struct, break, else, long,Auto, double, int, struct, break, else, long, switch, case, enum , register, typedef , const,switch, case, enum , register, typedef , const, extern, return, union, char ,float ,shortextern, return, union, char ,float ,short ,unsigned ,continue ,for ,signed ,volatile,unsigned ,continue ,for ,signed ,volatile ,default ,goto ,sizeof ,void ,do ,if, static, while.,default ,goto ,sizeof ,void ,do ,if, static, while.
  • 9. Variables…….Variables…….  a data item that may take on more thana data item that may take on more than one value during the runtime of aone value during the runtime of a program.program.  Variables point to the memory locationVariables point to the memory location which can be further changed or modifieswhich can be further changed or modifies according to the need of program.according to the need of program.  Declaration: int x; char a; float p;Declaration: int x; char a; float p;
  • 10. Constants………Constants………  Constants are those value which remainsConstants are those value which remains same through out the program.same through out the program.  They can also be defined before mainThey can also be defined before main function by using #define pie 3.14function by using #define pie 3.14  Eg- float pie=3.14;Eg- float pie=3.14;
  • 11. To be continued inTo be continued in lecture 5………lecture 5……… //email us//email us at:umairnsr87@gmail.comat:umairnsr87@gmail.com //contact no:09045562429//contact no:09045562429