CBSE Class 12 Computer Science Question 37 of 103

Working with Functions — Question 13

Back to all questions
13
Question

Question 13

What is a variable defined outside all the functions referred to as ?

  1. A static variable
  2. A global variable
  3. A local variable
  4. An automatic variable
Answer

A global variable

Reason — A global variable is a variable declared in top level segment (__main__) of a program and usable inside the whole program and all blocks contained within the program.