SlideShare a Scribd company logo
Presentation by
“Nayyab Mir”
Topic name:
“Scope rule”
Definition of “Scope Rule”
• The scope rules of a language decides in which part(s) of the program
a particular piece of code on data in item can be accessed
Basic four scope rules:
1. File scope
2. Block scope
3. Function prototype scope
4. Function scope
• File scope: “ These Variable s are usually declare outside of all functions
and blocks at the top of program. They are also called global scope
variable.”
• Block scope: “A block scope is a set of statement enclosed within left and
right braces i.e. A variable declare d inside a block is accessible in the inner
block but not accessible outside the block i.e.only accessible to the block in
which variables are defined”
• Function prototype: “In these the scope of variables begin right after the
declaration in function parameter list and run to the and the declaration
list”
• Function scope: “A function scope begins at the opening of function and
end with the closing of it.
A function scope is applicable to the label only. A label declared is use as a
Target to goto statement and both goto and label statement must be in a
same function.
scope rules.pptx

More Related Content

Similar to scope rules.pptx

Variable scope in php
Variable scope in phpVariable scope in php
Variable scope in php
MUHAMMED MASHAHIL PUKKUNNUMMAL
 
Storage Class Specifiers
Storage Class SpecifiersStorage Class Specifiers
Storage Class Specifiers
Reddhi Basu
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
Reddhi Basu
 
10. sub program
10. sub program10. sub program
The Ring programming language version 1.9 book - Part 85 of 210
The Ring programming language version 1.9 book - Part 85 of 210The Ring programming language version 1.9 book - Part 85 of 210
The Ring programming language version 1.9 book - Part 85 of 210
Mahmoud Samir Fayed
 
java tutorial for beginners learning.ppt
java tutorial for beginners learning.pptjava tutorial for beginners learning.ppt
java tutorial for beginners learning.ppt
usha852
 
01 Variables
01 Variables01 Variables
01 Variables
Learn 2 Be
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of Variable
MOHIT DADU
 
The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202
Mahmoud Samir Fayed
 
UNIT-IV WT web technology for 1st year cs
UNIT-IV WT web technology for 1st year csUNIT-IV WT web technology for 1st year cs
UNIT-IV WT web technology for 1st year cs
javed75
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
Jeba Moses
 
Chap1 packages
Chap1 packagesChap1 packages
Chap1 packages
raksharao
 
Storage classes
Storage classesStorage classes
Storage classes
UTTAM VERMA
 
Js scope
Js scopeJs scope
Understanding And Using Reflection
Understanding And Using ReflectionUnderstanding And Using Reflection
Understanding And Using Reflection
Ganesh Samarthyam
 
Refactoring_Rosenheim_2008_Workshop
Refactoring_Rosenheim_2008_WorkshopRefactoring_Rosenheim_2008_Workshop
Refactoring_Rosenheim_2008_Workshop
Max Kleiner
 
Coding
CodingCoding
Coding
Vishal Singh
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
Excellence Academy
 
Skillwise - Cobol Programming Basics
Skillwise - Cobol Programming BasicsSkillwise - Cobol Programming Basics
Skillwise - Cobol Programming Basics
Skillwise Group
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
kinish kumar
 

Similar to scope rules.pptx (20)

Variable scope in php
Variable scope in phpVariable scope in php
Variable scope in php
 
Storage Class Specifiers
Storage Class SpecifiersStorage Class Specifiers
Storage Class Specifiers
 
Storage Class Specifiers in C++
Storage Class Specifiers in C++Storage Class Specifiers in C++
Storage Class Specifiers in C++
 
10. sub program
10. sub program10. sub program
10. sub program
 
The Ring programming language version 1.9 book - Part 85 of 210
The Ring programming language version 1.9 book - Part 85 of 210The Ring programming language version 1.9 book - Part 85 of 210
The Ring programming language version 1.9 book - Part 85 of 210
 
java tutorial for beginners learning.ppt
java tutorial for beginners learning.pptjava tutorial for beginners learning.ppt
java tutorial for beginners learning.ppt
 
01 Variables
01 Variables01 Variables
01 Variables
 
Operator Overloading and Scope of Variable
Operator Overloading and Scope of VariableOperator Overloading and Scope of Variable
Operator Overloading and Scope of Variable
 
The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202The Ring programming language version 1.8 book - Part 81 of 202
The Ring programming language version 1.8 book - Part 81 of 202
 
UNIT-IV WT web technology for 1st year cs
UNIT-IV WT web technology for 1st year csUNIT-IV WT web technology for 1st year cs
UNIT-IV WT web technology for 1st year cs
 
EEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answerEEE oops Vth semester viva questions with answer
EEE oops Vth semester viva questions with answer
 
Chap1 packages
Chap1 packagesChap1 packages
Chap1 packages
 
Storage classes
Storage classesStorage classes
Storage classes
 
Js scope
Js scopeJs scope
Js scope
 
Understanding And Using Reflection
Understanding And Using ReflectionUnderstanding And Using Reflection
Understanding And Using Reflection
 
Refactoring_Rosenheim_2008_Workshop
Refactoring_Rosenheim_2008_WorkshopRefactoring_Rosenheim_2008_Workshop
Refactoring_Rosenheim_2008_Workshop
 
Coding
CodingCoding
Coding
 
Python Course In Chandigarh
Python Course In ChandigarhPython Course In Chandigarh
Python Course In Chandigarh
 
Skillwise - Cobol Programming Basics
Skillwise - Cobol Programming BasicsSkillwise - Cobol Programming Basics
Skillwise - Cobol Programming Basics
 
Basic construction of c
Basic construction of cBasic construction of c
Basic construction of c
 

More from NayyabMirTahir

HR Strategy and work force diversity.pptx
HR Strategy and work force diversity.pptxHR Strategy and work force diversity.pptx
HR Strategy and work force diversity.pptx
NayyabMirTahir
 
Group 5 HRM PRESENTATION.pptx
Group 5 HRM PRESENTATION.pptxGroup 5 HRM PRESENTATION.pptx
Group 5 HRM PRESENTATION.pptx
NayyabMirTahir
 
ch1-1.ppt
ch1-1.pptch1-1.ppt
ch1-1.ppt
NayyabMirTahir
 
group 4 week 7.pptx
group 4 week 7.pptxgroup 4 week 7.pptx
group 4 week 7.pptx
NayyabMirTahir
 
Sources of recruitment.pptx
Sources of recruitment.pptxSources of recruitment.pptx
Sources of recruitment.pptx
NayyabMirTahir
 
Past Papers (Compiler Construction).pdf
Past Papers (Compiler Construction).pdfPast Papers (Compiler Construction).pdf
Past Papers (Compiler Construction).pdf
NayyabMirTahir
 
Nayyab Mir 25.docx
Nayyab Mir 25.docxNayyab Mir 25.docx
Nayyab Mir 25.docx
NayyabMirTahir
 
Organizational Structure, do's and dont's.ppt
Organizational Structure, do's and dont's.pptOrganizational Structure, do's and dont's.ppt
Organizational Structure, do's and dont's.ppt
NayyabMirTahir
 
group..4 (1).pptx
group..4 (1).pptxgroup..4 (1).pptx
group..4 (1).pptx
NayyabMirTahir
 
MPI.pptx
MPI.pptxMPI.pptx
MPI.pptx
NayyabMirTahir
 
Nayyab Mir 1922110025.pdf
Nayyab Mir 1922110025.pdfNayyab Mir 1922110025.pdf
Nayyab Mir 1922110025.pdf
NayyabMirTahir
 
computing standards.pdf
computing standards.pdfcomputing standards.pdf
computing standards.pdf
NayyabMirTahir
 
Statement of Cash Flows - CR.pdf
Statement of Cash Flows - CR.pdfStatement of Cash Flows - CR.pdf
Statement of Cash Flows - CR.pdf
NayyabMirTahir
 
Spatial filters.pdf
Spatial filters.pdfSpatial filters.pdf
Spatial filters.pdf
NayyabMirTahir
 
OOAD t1 short questions.pdf
OOAD t1 short questions.pdfOOAD t1 short questions.pdf
OOAD t1 short questions.pdf
NayyabMirTahir
 
AI week 2.pdf
AI week 2.pdfAI week 2.pdf
AI week 2.pdf
NayyabMirTahir
 
past papers solved.pdf
past papers solved.pdfpast papers solved.pdf
past papers solved.pdf
NayyabMirTahir
 
Lecture 1 FA.docx
Lecture 1 FA.docxLecture 1 FA.docx
Lecture 1 FA.docx
NayyabMirTahir
 
income statement and journal .pdf
income statement and journal .pdfincome statement and journal .pdf
income statement and journal .pdf
NayyabMirTahir
 
accrual examples .pdf
accrual examples .pdfaccrual examples .pdf
accrual examples .pdf
NayyabMirTahir
 

More from NayyabMirTahir (20)

HR Strategy and work force diversity.pptx
HR Strategy and work force diversity.pptxHR Strategy and work force diversity.pptx
HR Strategy and work force diversity.pptx
 
Group 5 HRM PRESENTATION.pptx
Group 5 HRM PRESENTATION.pptxGroup 5 HRM PRESENTATION.pptx
Group 5 HRM PRESENTATION.pptx
 
ch1-1.ppt
ch1-1.pptch1-1.ppt
ch1-1.ppt
 
group 4 week 7.pptx
group 4 week 7.pptxgroup 4 week 7.pptx
group 4 week 7.pptx
 
Sources of recruitment.pptx
Sources of recruitment.pptxSources of recruitment.pptx
Sources of recruitment.pptx
 
Past Papers (Compiler Construction).pdf
Past Papers (Compiler Construction).pdfPast Papers (Compiler Construction).pdf
Past Papers (Compiler Construction).pdf
 
Nayyab Mir 25.docx
Nayyab Mir 25.docxNayyab Mir 25.docx
Nayyab Mir 25.docx
 
Organizational Structure, do's and dont's.ppt
Organizational Structure, do's and dont's.pptOrganizational Structure, do's and dont's.ppt
Organizational Structure, do's and dont's.ppt
 
group..4 (1).pptx
group..4 (1).pptxgroup..4 (1).pptx
group..4 (1).pptx
 
MPI.pptx
MPI.pptxMPI.pptx
MPI.pptx
 
Nayyab Mir 1922110025.pdf
Nayyab Mir 1922110025.pdfNayyab Mir 1922110025.pdf
Nayyab Mir 1922110025.pdf
 
computing standards.pdf
computing standards.pdfcomputing standards.pdf
computing standards.pdf
 
Statement of Cash Flows - CR.pdf
Statement of Cash Flows - CR.pdfStatement of Cash Flows - CR.pdf
Statement of Cash Flows - CR.pdf
 
Spatial filters.pdf
Spatial filters.pdfSpatial filters.pdf
Spatial filters.pdf
 
OOAD t1 short questions.pdf
OOAD t1 short questions.pdfOOAD t1 short questions.pdf
OOAD t1 short questions.pdf
 
AI week 2.pdf
AI week 2.pdfAI week 2.pdf
AI week 2.pdf
 
past papers solved.pdf
past papers solved.pdfpast papers solved.pdf
past papers solved.pdf
 
Lecture 1 FA.docx
Lecture 1 FA.docxLecture 1 FA.docx
Lecture 1 FA.docx
 
income statement and journal .pdf
income statement and journal .pdfincome statement and journal .pdf
income statement and journal .pdf
 
accrual examples .pdf
accrual examples .pdfaccrual examples .pdf
accrual examples .pdf
 

Recently uploaded

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
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
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
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
 
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
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
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
 
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
 
“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
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
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
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 

Recently uploaded (20)

HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
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...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
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
 
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
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
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
 
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
 
“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...
 
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
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
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
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 

scope rules.pptx

  • 1. Presentation by “Nayyab Mir” Topic name: “Scope rule”
  • 2. Definition of “Scope Rule” • The scope rules of a language decides in which part(s) of the program a particular piece of code on data in item can be accessed Basic four scope rules: 1. File scope 2. Block scope 3. Function prototype scope 4. Function scope
  • 3. • File scope: “ These Variable s are usually declare outside of all functions and blocks at the top of program. They are also called global scope variable.” • Block scope: “A block scope is a set of statement enclosed within left and right braces i.e. A variable declare d inside a block is accessible in the inner block but not accessible outside the block i.e.only accessible to the block in which variables are defined” • Function prototype: “In these the scope of variables begin right after the declaration in function parameter list and run to the and the declaration list” • Function scope: “A function scope begins at the opening of function and end with the closing of it. A function scope is applicable to the label only. A label declared is use as a Target to goto statement and both goto and label statement must be in a same function.