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

What new information could the reader learn if Gentleman of Río en Medio were told from Don Anselmos point of view. A: what Don looks like B: Dons thoughts and
Which of the following events led Germany to be divided into West Germany and East Germany? the fall of Hitler and the end of World War II B the Berlin Airlift
How do scientists think Prokaryotic Cells contributed to changing Earth’s atmosphere to include more oxygen?
Pls help me with this problem
PLEASE HELP!!! IT WOULD MEAN SO MUCH TO ME :))
Which of the following is a benefit of physical activity? A. More anxiety B. Better concentration C. Less need for sleep D. More weight gain
Find the value of x.
Identify each triangle based on angles. (Acute, Obtuse or Right) PLEASE HELP
mayas computer screen has a ratio of width to height of 4:3 if her screen is 28 inches wide what is the height?​
what are organisms competing for in the environment?