Ans: Global variables are declared outside a function or in global space and can be assessed either inside or outside a function. The variables declared inside a function are called local variables, and they are present in the local space.