Home / Questions / What is global variable in C?
Explanatory Question

What is global variable in C?

👁 827 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

  • The variables which are having scope/life throughout the program are called global variables.
  • Global variable is defined outside the main function. So, this variable is visible to main function and all other sub-functions.