Global Variables V/S Static Variables
Thread TagsAdobe Illustrator Adobe InDesign Adobe Photoshop Android Development Android Programming Android Studio Automation Testing C / C++ Programming Career Options College Lounge css designed Design layout digital marketing Digital Marketing / SEO Fireworks Graphic Design Graphic designing Graphics Design Graphics Designing HTML? Illustrator Internship Training logo Design logo designing mobile phones Photoshop QA react-native Scroll Website SEO Single Page Website Testing Typography UI UI/UX Development UI Design UI Designing UI development User Interface UX Design Viewport Web Designing web pages Website Design
Log in with your username and password
Register for free!
Registration at Smart Mentors is completely free and takes only a few seconds. By registering you’ll gain:
- Full Posting Privileges.
- Access to Private Messaging.
- Optional Email Notification.
- Ability to Fully Participate.
- Author Replies
- February 7, 2019 at 10:26 am #53268
The extent of the variable depicts that the variable is accessible at a certain point in the program or not. The contrast between global variables and static variables lies in this idea as it were.
1) Global variables are put away in the Data Segment of the procedure.
2) Global variable’s life is until the life of the program and it very well may be gotten to by different files utilizing extern keyword.
3) The extent of the global variables stays all through the program likewise the life expectancy of these factors is all through the program.
1) A static variable can be proclaimed outside all functions or inside a function utilizing a static keyword before the data type of variable.
2) The extent of the static Variables stays inside the block of code in which they are made yet the life expectancy stays all through the program.
Along these lines, the fundamental distinction is between the scope of both types of variables.
You must be register. Registration is 100% free.to reply to this thread.Please or