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

Make t subject of formula.S=P(1+Rt)
How did slaves travel from one station to another during the underground railroad?
236= 2 hundreds 3 tens and ______ ones = 2 hundreds 2 tens and ______ ones
Read the excerpt below from the novel The Adventures of Huckleberry Finn by Mark Twain. Analyze the chart and answer the question that follows. Her sister, Miss
20% of 150 is what number?
Find the area of each shape by decomposing it into smaller shapes, and combining their area.
a group consisted of 2 girls for every boy. 24 girls joined the group. there are now 5 girls for every boy. how many boys are in the group
what is the difference between the product of 19 and 3.6 , and thw sun of 2.87 and 3.5
which of the following was not a key political thinker of the enlightenment
The area of a rectangular city park is 25/54 square miles. The length of the park is 5/9 mile. What is the width, in miles, of the park?