omalys7492 omalys7492
  • 21-08-2019
  • Computers and Technology
contestada

The scope of a variable declared inside of a function is:

a) Local - within that function

b) Within that file only

c) global

Respuesta :

codiepienagoya codiepienagoya
  • 21-08-2019

Answer:

a

Explanation:

The variable declared is local within that function that is the declared variable is accessible inside that block itself, it cannot be accessible outside the given function.

ex - void add()

{

int a=10,  b=20 , c ;

c = a + b ;

cout << c ;

}

int main()

{

cout << "value for c is :"<< c ;

return 0;

}

Here inside the add function variable a, b,c are declared and initialized inside the function.

Answer Link

Otras preguntas

The width of a rectangle is 20% of its length. If the area of this rectangle is 720 square inches, what is its length?
international event were human rights are violeted
Why would ancient societies have valued bridges
W(t)=-2t+1 find w(-7)
What is the relationship between the solution of an equation in two variables and its graph?
1/10 or 200 tables is what?
what was the main commodity grown in georgia
How can an arrow be used to represent the size and direction of a force?
Jack is taking medications for a recent illness. Every 6 hours he takes an antibiotic, every 4 hours he takes a pain reliever, and every 3 hours he drinks a gla
Write an equation in slope -intercept form of each line described. 1. Slope 1/3 ; passes through (6,0) 2. Slope 0; passes through (1,3)