SlideShare a Scribd company logo
Jagannath Institute of Management Sciences
Vasant Kunj-II, New Delhi - 110070
Subject Name: Programming In C
Department of Information Technology
Created By: Dr. Arpana Chaturvedi
@Dr. Arpana Chaturvedi
Subject: Programming In C
Topic: Unit II- Part I
Two Dimensional Arrays
@Dr. Arpana Chaturvedi
Topics to be Covered
▰ Two dimensional arrays
▰ Addition/Multiplication of two matrices
▰ Multiplication of two matrices
▰ Transpose of a square matrix
▰ Strings-Null terminated strings as array of characters
▰ Standard library string functions
Two dimensional Arrays in C
@Dr. Arpana Chaturvedi
Arrays of Array
@Dr. Arpana Chaturvedi
User View and memory View
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Storage Classes
@Dr. Arpana Chaturvedi
Storage Classes in C
Storage class specifiers in C language tells the compiler where to store a variable,
how to store the variable, what is the initial value of the variable and life time of the
variable.
SYNTAX:
▰ storage_specifier data_type variable _name;
TYPES OF STORAGE CLASS SPECIFIERS IN C:
▰ There are 4 storage class specifiers available in C language. They are,
▰ auto
▰ extern
▰ static
▰ register
@Dr. Arpana Chaturvedi
Types of Storage Specifiers in C
@Dr. Arpana Chaturvedi
Storage Specifier Description
auto
Storage place: CPU Memory
Initial/default value: Garbage value
Scope: local
Life: Within the function only.
extern
Storage place: CPU memory
Initial/default value: Zero
Scope: Global
Life: Till the end of the main program. Variable definition might be
anywhere in the C program.
static
Storage place: CPU memory
Initial/default value: Zero
Scope: local
Life: Retains the value of the variable between different function calls.
register
Storage place: Register memory
Initial/default value: Garbage value
Scope: local
Life: Within the function only.
Key Points to use Storage Specifiers in C
▰ For faster access of a variable, it is better to go for register specifiers rather than
auto specifiers.
▰ Because, register variables are stored in register memory whereas auto variables
are stored in main CPU memory.
▰ Only few variables can be stored in register memory. So, we can use variables as
register that are used very often in a C program.
@Dr. Arpana Chaturvedi
EXAMPLE PROGRAM FOR AUTO
VARIABLE IN C:
The scope of this auto variable is within the function only. It is
equivalent to local variable. All local variables are auto variables
by default.
@Dr. Arpana Chaturvedi
EXAMPLE PROGRAM FOR STATIC
VARIABLE IN C:
▰ Static variables retain the value of the variable between
different function calls.
@Dr. Arpana Chaturvedi
EXAMPLE PROGRAM FOR EXTERN
VARIABLE IN C:
▰ The scope of this extern variable is throughout the main
program. It is equivalent to global variable. Definition for
extern variable might be anywhere in the C program
@Dr. Arpana Chaturvedi
EXAMPLE PROGRAM FOR REGISTER
VARIABLE IN C:
▰ Register variables are also local variables, but stored in
register memory. Whereas, auto variables are stored in main
CPU memory.
▰ Register variables will be accessed very faster than the
normal variables since they are stored in register memory
rather than main memory.
▰ But, only limited variables can be used as register since
register size is very low. (16 bits, 32 bits or 64 bits)
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Data Types in C
@Dr. Arpana Chaturvedi
Decision Making Statements in C
@Dr. Arpana Chaturvedi
Dangling else in C
@Dr. Arpana Chaturvedi
Dangling else in C
@Dr. Arpana Chaturvedi
Dangling else in C
@Dr. Arpana Chaturvedi
Thank You !!

More Related Content

What's hot

Primitive data types
Primitive data typesPrimitive data types
Primitive data types
bad_zurbic
 
Introduction to Rstudio
Introduction to RstudioIntroduction to Rstudio
Introduction to Rstudio
Olga Scrivner
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming Languages
Vasavi College of Engg
 
Run time storage
Run time storageRun time storage
Run time storage
Rasineni Madhan Mohan Naidu
 
C presentation
C presentationC presentation
Standard Library Functions
Standard Library FunctionsStandard Library Functions
Standard Library Functions
Praveen M Jigajinni
 
Sparql semantic information retrieval by
Sparql semantic information retrieval bySparql semantic information retrieval by
Sparql semantic information retrieval by
IJNSA Journal
 
Python Data Types
Python Data TypesPython Data Types
Python Data Types
athithanvijay
 
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
sumitbardhan
 
Unit 5 cspc
Unit 5 cspcUnit 5 cspc
Unit 5 cspc
BBDITM LUCKNOW
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
Prof. Dr. K. Adisesha
 
Lexyacc
LexyaccLexyacc
Lexyacc
unifesptk
 
Yacc
YaccYacc
ISI work
ISI workISI work
ISI work
dgarijo
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
Taha Malampatti
 
Chapter 2.datatypes and operators
Chapter 2.datatypes and operatorsChapter 2.datatypes and operators
Chapter 2.datatypes and operators
Jasleen Kaur (Chandigarh University)
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
Prof. Dr. K. Adisesha
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
K Durga Prasad
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File Processing
Ranel Padon
 
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
Binary Studio
 

What's hot (20)

Primitive data types
Primitive data typesPrimitive data types
Primitive data types
 
Introduction to Rstudio
Introduction to RstudioIntroduction to Rstudio
Introduction to Rstudio
 
Unit 2 Principles of Programming Languages
Unit 2 Principles of Programming LanguagesUnit 2 Principles of Programming Languages
Unit 2 Principles of Programming Languages
 
Run time storage
Run time storageRun time storage
Run time storage
 
C presentation
C presentationC presentation
C presentation
 
Standard Library Functions
Standard Library FunctionsStandard Library Functions
Standard Library Functions
 
Sparql semantic information retrieval by
Sparql semantic information retrieval bySparql semantic information retrieval by
Sparql semantic information retrieval by
 
Python Data Types
Python Data TypesPython Data Types
Python Data Types
 
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
358 33 powerpoint-slides_4-introduction-data-structures_chapter-4
 
Unit 5 cspc
Unit 5 cspcUnit 5 cspc
Unit 5 cspc
 
Introduction to c++ ppt
Introduction to c++ pptIntroduction to c++ ppt
Introduction to c++ ppt
 
Lexyacc
LexyaccLexyacc
Lexyacc
 
Yacc
YaccYacc
Yacc
 
ISI work
ISI workISI work
ISI work
 
Lex & yacc
Lex & yaccLex & yacc
Lex & yacc
 
Chapter 2.datatypes and operators
Chapter 2.datatypes and operatorsChapter 2.datatypes and operators
Chapter 2.datatypes and operators
 
Introduction to c++
Introduction to c++Introduction to c++
Introduction to c++
 
Getting started with c++
Getting started with c++Getting started with c++
Getting started with c++
 
Python Programming - XII. File Processing
Python Programming - XII. File ProcessingPython Programming - XII. File Processing
Python Programming - XII. File Processing
 
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
Binary Studio Academy PRO: ANTLR course by Alexander Vasiltsov (lesson 1)
 

Similar to Arrays 2 Dimensional Unit 2 Part 1.pdf

Storage class
Storage classStorage class
Storage class
Kalaikumar Thangapandi
 
cs8251 unit 1 ppt
cs8251 unit 1 pptcs8251 unit 1 ppt
cs8251 unit 1 ppt
praveenaprakasam
 
Terms and Definitions.pdf
Terms and Definitions.pdfTerms and Definitions.pdf
Terms and Definitions.pdf
SheikhAbrarAhmad
 
Storage class
Storage classStorage class
Storage class
Joy Forerver
 
Types of storage class specifiers in c programming
Types of storage class specifiers in c programmingTypes of storage class specifiers in c programming
Types of storage class specifiers in c programming
Appili Vamsi Krishna
 
C language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C languageC language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C language
Rakesh Roshan
 
Unit-4 (Scope Rules and Arrays).pptx for
Unit-4 (Scope Rules and Arrays).pptx forUnit-4 (Scope Rules and Arrays).pptx for
Unit-4 (Scope Rules and Arrays).pptx for
pattinsonhenry524
 
Java platform
Java platformJava platform
Java platform
Visithan
 
Storage classes
Storage classesStorage classes
Storage classes
priyanka jain
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
Mahfuzur Rahman
 
Basic Information About C language PDF
Basic Information About C language PDFBasic Information About C language PDF
Basic Information About C language PDF
Suraj Das
 
Interview Questions C.docx
Interview Questions C.docxInterview Questions C.docx
Interview Questions C.docx
SergiuMatei7
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems complete
Anand Kumar
 
Understanding Storage Classes in C.pdf
Understanding Storage Classes in C.pdfUnderstanding Storage Classes in C.pdf
Understanding Storage Classes in C.pdf
SumanaDotNetTricks
 
Storage_classes_and_Scope_rules.pptx
Storage_classes_and_Scope_rules.pptxStorage_classes_and_Scope_rules.pptx
Storage_classes_and_Scope_rules.pptx
CheriviralaNikhil
 
Advanced C Programming Notes
Advanced C Programming NotesAdvanced C Programming Notes
Advanced C Programming Notes
Leslie Schulte
 
CodeQL a Powerful Binary Analysis Engine
CodeQL a Powerful Binary Analysis EngineCodeQL a Powerful Binary Analysis Engine
CodeQL a Powerful Binary Analysis Engine
MaryEliot
 
C language updated
C language updatedC language updated
C language updated
Arafat Bin Reza
 
C language
C languageC language
C language
Arafat Bin Reza
 
Cao
CaoCao

Similar to Arrays 2 Dimensional Unit 2 Part 1.pdf (20)

Storage class
Storage classStorage class
Storage class
 
cs8251 unit 1 ppt
cs8251 unit 1 pptcs8251 unit 1 ppt
cs8251 unit 1 ppt
 
Terms and Definitions.pdf
Terms and Definitions.pdfTerms and Definitions.pdf
Terms and Definitions.pdf
 
Storage class
Storage classStorage class
Storage class
 
Types of storage class specifiers in c programming
Types of storage class specifiers in c programmingTypes of storage class specifiers in c programming
Types of storage class specifiers in c programming
 
C language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C languageC language Unit 2 Slides, UPTU C language
C language Unit 2 Slides, UPTU C language
 
Unit-4 (Scope Rules and Arrays).pptx for
Unit-4 (Scope Rules and Arrays).pptx forUnit-4 (Scope Rules and Arrays).pptx for
Unit-4 (Scope Rules and Arrays).pptx for
 
Java platform
Java platformJava platform
Java platform
 
Storage classes
Storage classesStorage classes
Storage classes
 
Lecture 2
Lecture 2Lecture 2
Lecture 2
 
Basic Information About C language PDF
Basic Information About C language PDFBasic Information About C language PDF
Basic Information About C language PDF
 
Interview Questions C.docx
Interview Questions C.docxInterview Questions C.docx
Interview Questions C.docx
 
Software for embedded systems complete
Software for embedded systems completeSoftware for embedded systems complete
Software for embedded systems complete
 
Understanding Storage Classes in C.pdf
Understanding Storage Classes in C.pdfUnderstanding Storage Classes in C.pdf
Understanding Storage Classes in C.pdf
 
Storage_classes_and_Scope_rules.pptx
Storage_classes_and_Scope_rules.pptxStorage_classes_and_Scope_rules.pptx
Storage_classes_and_Scope_rules.pptx
 
Advanced C Programming Notes
Advanced C Programming NotesAdvanced C Programming Notes
Advanced C Programming Notes
 
CodeQL a Powerful Binary Analysis Engine
CodeQL a Powerful Binary Analysis EngineCodeQL a Powerful Binary Analysis Engine
CodeQL a Powerful Binary Analysis Engine
 
C language updated
C language updatedC language updated
C language updated
 
C language
C languageC language
C language
 
Cao
CaoCao
Cao
 

More from Arpana Awasthi

Unit 5 Part 1 Macros
Unit 5 Part 1 MacrosUnit 5 Part 1 Macros
Unit 5 Part 1 Macros
Arpana Awasthi
 
Unit 2 Part 1.2 Data Types.pdf
Unit 2 Part 1.2 Data Types.pdfUnit 2 Part 1.2 Data Types.pdf
Unit 2 Part 1.2 Data Types.pdf
Arpana Awasthi
 
Introduction To Python.pdf
Introduction To Python.pdfIntroduction To Python.pdf
Introduction To Python.pdf
Arpana Awasthi
 
Unit 2 Part 1 POLYMORPHISM.pdf
Unit 2 Part 1 POLYMORPHISM.pdfUnit 2 Part 1 POLYMORPHISM.pdf
Unit 2 Part 1 POLYMORPHISM.pdf
Arpana Awasthi
 
Unit 2 Part 1 Constructors.pdf
Unit 2 Part 1 Constructors.pdfUnit 2 Part 1 Constructors.pdf
Unit 2 Part 1 Constructors.pdf
Arpana Awasthi
 
Eclipse - GUI Palette
Eclipse - GUI Palette Eclipse - GUI Palette
Eclipse - GUI Palette
Arpana Awasthi
 
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its ApplicationsMachine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
Arpana Awasthi
 
Programming language
Programming languageProgramming language
Programming language
Arpana Awasthi
 
Role of machine learning in detection, prevention and treatment of cancer
Role of machine learning in detection, prevention and treatment of cancerRole of machine learning in detection, prevention and treatment of cancer
Role of machine learning in detection, prevention and treatment of cancer
Arpana Awasthi
 

More from Arpana Awasthi (9)

Unit 5 Part 1 Macros
Unit 5 Part 1 MacrosUnit 5 Part 1 Macros
Unit 5 Part 1 Macros
 
Unit 2 Part 1.2 Data Types.pdf
Unit 2 Part 1.2 Data Types.pdfUnit 2 Part 1.2 Data Types.pdf
Unit 2 Part 1.2 Data Types.pdf
 
Introduction To Python.pdf
Introduction To Python.pdfIntroduction To Python.pdf
Introduction To Python.pdf
 
Unit 2 Part 1 POLYMORPHISM.pdf
Unit 2 Part 1 POLYMORPHISM.pdfUnit 2 Part 1 POLYMORPHISM.pdf
Unit 2 Part 1 POLYMORPHISM.pdf
 
Unit 2 Part 1 Constructors.pdf
Unit 2 Part 1 Constructors.pdfUnit 2 Part 1 Constructors.pdf
Unit 2 Part 1 Constructors.pdf
 
Eclipse - GUI Palette
Eclipse - GUI Palette Eclipse - GUI Palette
Eclipse - GUI Palette
 
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its ApplicationsMachine Learning: Need of Machine Learning, Its Challenges and its Applications
Machine Learning: Need of Machine Learning, Its Challenges and its Applications
 
Programming language
Programming languageProgramming language
Programming language
 
Role of machine learning in detection, prevention and treatment of cancer
Role of machine learning in detection, prevention and treatment of cancerRole of machine learning in detection, prevention and treatment of cancer
Role of machine learning in detection, prevention and treatment of cancer
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
Octavian Nadolu
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Artificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopmentArtificial Intelligence for XMLDevelopment
Artificial Intelligence for XMLDevelopment
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 

Arrays 2 Dimensional Unit 2 Part 1.pdf

  • 1. Jagannath Institute of Management Sciences Vasant Kunj-II, New Delhi - 110070 Subject Name: Programming In C Department of Information Technology Created By: Dr. Arpana Chaturvedi @Dr. Arpana Chaturvedi
  • 2. Subject: Programming In C Topic: Unit II- Part I Two Dimensional Arrays @Dr. Arpana Chaturvedi
  • 3. Topics to be Covered ▰ Two dimensional arrays ▰ Addition/Multiplication of two matrices ▰ Multiplication of two matrices ▰ Transpose of a square matrix ▰ Strings-Null terminated strings as array of characters ▰ Standard library string functions
  • 4. Two dimensional Arrays in C @Dr. Arpana Chaturvedi
  • 5. Arrays of Array @Dr. Arpana Chaturvedi
  • 6. User View and memory View @Dr. Arpana Chaturvedi
  • 7. Data Types in C @Dr. Arpana Chaturvedi
  • 8. Data Types in C @Dr. Arpana Chaturvedi
  • 9. Data Types in C @Dr. Arpana Chaturvedi
  • 10. Data Types in C @Dr. Arpana Chaturvedi
  • 11. Data Types in C @Dr. Arpana Chaturvedi
  • 12. Data Types in C @Dr. Arpana Chaturvedi
  • 13. Data Types in C @Dr. Arpana Chaturvedi
  • 14. Data Types in C @Dr. Arpana Chaturvedi
  • 15. Data Types in C @Dr. Arpana Chaturvedi
  • 16. Data Types in C @Dr. Arpana Chaturvedi
  • 17. Data Types in C @Dr. Arpana Chaturvedi
  • 18. Data Types in C @Dr. Arpana Chaturvedi
  • 20. Storage Classes in C Storage class specifiers in C language tells the compiler where to store a variable, how to store the variable, what is the initial value of the variable and life time of the variable. SYNTAX: ▰ storage_specifier data_type variable _name; TYPES OF STORAGE CLASS SPECIFIERS IN C: ▰ There are 4 storage class specifiers available in C language. They are, ▰ auto ▰ extern ▰ static ▰ register @Dr. Arpana Chaturvedi
  • 21. Types of Storage Specifiers in C @Dr. Arpana Chaturvedi Storage Specifier Description auto Storage place: CPU Memory Initial/default value: Garbage value Scope: local Life: Within the function only. extern Storage place: CPU memory Initial/default value: Zero Scope: Global Life: Till the end of the main program. Variable definition might be anywhere in the C program. static Storage place: CPU memory Initial/default value: Zero Scope: local Life: Retains the value of the variable between different function calls. register Storage place: Register memory Initial/default value: Garbage value Scope: local Life: Within the function only.
  • 22. Key Points to use Storage Specifiers in C ▰ For faster access of a variable, it is better to go for register specifiers rather than auto specifiers. ▰ Because, register variables are stored in register memory whereas auto variables are stored in main CPU memory. ▰ Only few variables can be stored in register memory. So, we can use variables as register that are used very often in a C program. @Dr. Arpana Chaturvedi
  • 23. EXAMPLE PROGRAM FOR AUTO VARIABLE IN C: The scope of this auto variable is within the function only. It is equivalent to local variable. All local variables are auto variables by default. @Dr. Arpana Chaturvedi
  • 24. EXAMPLE PROGRAM FOR STATIC VARIABLE IN C: ▰ Static variables retain the value of the variable between different function calls. @Dr. Arpana Chaturvedi
  • 25. EXAMPLE PROGRAM FOR EXTERN VARIABLE IN C: ▰ The scope of this extern variable is throughout the main program. It is equivalent to global variable. Definition for extern variable might be anywhere in the C program @Dr. Arpana Chaturvedi
  • 26. EXAMPLE PROGRAM FOR REGISTER VARIABLE IN C: ▰ Register variables are also local variables, but stored in register memory. Whereas, auto variables are stored in main CPU memory. ▰ Register variables will be accessed very faster than the normal variables since they are stored in register memory rather than main memory. ▰ But, only limited variables can be used as register since register size is very low. (16 bits, 32 bits or 64 bits) @Dr. Arpana Chaturvedi
  • 27. Data Types in C @Dr. Arpana Chaturvedi
  • 28. Data Types in C @Dr. Arpana Chaturvedi
  • 29. Decision Making Statements in C @Dr. Arpana Chaturvedi
  • 30. Dangling else in C @Dr. Arpana Chaturvedi
  • 31. Dangling else in C @Dr. Arpana Chaturvedi
  • 32. Dangling else in C @Dr. Arpana Chaturvedi