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

Got a test on Monday pls help :)
how much for 9.3 gallons of gas at $3.30 a gallon​
what is the mass, in grams, of 9.29×1024 molecules of methanol (CH3OH)?
What is an example of a closed question or statement?
3 A trader buys some goods for $820. When he sells them, he makes a profit of 35%. a Work out the profit, in dollars. b Work out how much he sells them for
What was Fred Korematsu arrested for which sparked the Korematsu v. United States case? A. Inciting violence against the military B. Refusing to move to the det
How does the media (newspapers, television, movies,, music) help perpetuate stereotyping?
In the diagram, roads a and b are parallel. Solve for x and find the measure of
explain in details the process of direct democracy
Determine if the two figures are congruent and explain your answer using transformations. C B -4 -3 -2 A T 4 2 - -1 -2 H -3 D E F 2 3 + G