Difference between Local and Global Variable
Key Differences between Local Variable and Global Variable The local variable is declared inside a function, whereas the Global variable is declared outside the function. Local variables are created when the function has started execution and is lost when the function terminates, on the other hand, a Global variable is created as execution starts and…

