Global Variables V/S Local Variable
Thread Tags
Adobe 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-
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.
Register Now, or check out the Site Tour and find out everything Smart Mentors has to offer.
Tagged: C / C++ Programming
This thread contains 1 reply, has 2 voices, and was last updated by Nitesh User Do not delete 3 years, 3 months ago.
-
Author Replies
-
February 9, 2019 at 10:26 am #53323
What Is The Difference Between Global Variables And Local Variable?
-
February 9, 2019 at 10:33 am #53325
Global variables are proclaimed outside any function, and they can be gotten to (utilized) on any function in the program. Local variables are proclaimed inside the function and can be utilized just inside that function. It is conceivable to have local variables with a similar name in various functions.
Global Variables:
1) Declaration – Variables are proclaimed outside any function.
2) Scope – Throughout the program.
3) Access – Accessed by a statement in the whole program.
4) Life – Remain in presence for the whole time your program is executing.
5) Storage – Stored on a settled area chosen by a compiler.Local Variable:
1) Declaration – Variables are pronounced inside a function.
2) Scope – Within a capacity, inside which they are proclaimed.
3) Access – Accessed just by the statements, inside a function in which they are proclaimed.
4) Life – Created when the function block is entered and annihilated upon exit.
5) Storage – Local variables are put away on the stack except if determined.
Regards,
Nitesh Bavishiya -
AuthorPosts
You must be logged in to reply to this thread.Please login or register. Registration is 100% free.