What are Local and Global Variables?

Local variables: The variables which are defined inside a particular function are known as Local variables. These local variables can be used only within that particular function but outside that function these variables are not accessible.

Global Variables: The variables which are not defined inside a particular function rather they are defined outside all the functions are called Global variables. These variables can be accessed from each and every part of the program as these are accessible to all the functions of a program.

More Questions

Leave a Reply

Word Verfication * Time limit is exhausted. Please reload CAPTCHA.