Computer Science, asked by hkrishnahazrape9rwv, 4 months ago

examples of global and local variable​

Answers

Answered by Anonymous
0

Answer:

When we print the variable inside foo() it outputs local x: 10 . This is called the local scope of the variable. Similarly, when we print the variable outside the foo() , it outputs global x: 5 . This is called the global scope of the variable.

Similar questions