Write short note on Global Variables and Local Variables.
Question :
Write short note on Global Variables and Local Variables.
Global variables: Global Variables, as the name suggests, are Global to the program i.e. they can be accessed anywhere in the program.
Local Variables: Local Variables, in contrast to Global Variables, are confined to their respective function.