Ask Question
25 December, 03:39

The scope of a variable declared outside of any function is:

a) Global

b) Local

c) Within that file only

+1
Answers (1)
  1. 25 December, 07:12
    0
    a) Global

    Explanation:

    The scope of a variable declared outside of any function is Global.

    Let us consider an example:

    int g;

    int add (int a, int b) {

    return a+b;

    }

    int subtract (int a, int b) {

    return a-b;

    }

    Here the variable g is defined outside any function and is accessible anywhere within the program. This is a global variable.

    Variables defined within each function - a, b on the other hand have a local scope are are visible only within their respective function bodies.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “The scope of a variable declared outside of any function is: a) Global b) Local c) Within that file only ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers