Franky5836 Franky5836
  • 23-08-2019
  • Computers and Technology
contestada

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

a) Global

b) Local

c) Within that file only

Respuesta :

Branta Branta
  • 26-08-2019

Answer:

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.

Answer Link

Otras preguntas

Without parentheses, the expression 8 plus 30 divided by 2 plus 4 equals 27. Rewrite this expression with parentheses so that it equals 13; then 23
how do you write 15,409 in word form
Solve for x 3(8x-5)=-4(7-6x)
a gardener has 27 pansies and 36 daisies. he plants an equal number of each type of flower in each row. what is the greatest possible number if pansies in each
Who was the sender and receiver in the Martin Luther King Jr. Speech ?
what is 7000 is 1/10 of
what is the meaning of lit, as its used in this sentence.. It was in the clove of seasons, summer was dead but autumn had not yet been born, that the ibis lit i
how do I find the property of 34+0+18+26
A spherical water tank holds 15000ft^3. What is the diameter of the tank? Use V=pie/6*d^3
what is the square root of 18.5