Download presentation
Presentation is loading. Please wait.
Published byΚυριακή Αναστασιάδης Modified over 6 years ago
1
Local Variables, Global Variables and Variable Scope
$p!derLabWeb C Programming Lecture-10 Local Variables, Global Variables and Variable Scope
2
Local Variables The variables which are declared inside the function or in a block is called the local variables. Its scope is inside that block or function. Which means that they can’t be accessed outside that block or function. When these are declared and not initialized with some value then these are initialized with the garbage values.
3
Global Variables These are the variables whose scope is all over the program. Which means we can access them any where in the program. When these are declared and not initialized with some value then these are initialized with the default values.
4
Default Values Table Datatype Default Values int float char ‘\0’
float char ‘\0’ double Pointer NULL
5
Thank you!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.