Computers & Technology
21 July, 10:06
The scope of a variable declared inside of a function is:
a) Local - within that function
b) Within that file only
21 July, 10:38
The correct answer for the given question is option (a) i. e Local - within that function.
The variable which is declared inside any function are called as local variable The scope and lifetime of local variable is inside that block or function only.
They cannot access outside the function.
Following are the example of local variable
#include / / header file
void fun (); / / function prototype
int main () / / main function
fun (); / /calling function
print ("%d", t); / / it gives error because t is local variable cannot access in main function
void fun ()
int t=9; / / local variable
printf ("t is local variable which value is:");
printf ("%d", t);
As we seen that t cannot access outside the function. So correct answer is option (a)
Know the Answer?
New Questions in Computers & Technology
Which are ways that humans can lower biodiversity as they use the environment? CHECK ALL THAT APPLY
The opera station broadcasts at 90.5 MHz and the rock nroll station at 07.1 MHz which station's signal has waves with longer wavelengths and which one has higher energy
Solve 3 q - 5 = 13 for q. q =
Beth files a suit against Cruise Line, Inc. Cruise responds that it appears from the pleadings that the parties do not dispute the facts and the only question is how the law applies to those facts.
Which of the following was best compares an armistice to a peace treaty
Aqueous hydrochloric acid will react with solid sodium hydroxide to produce aqueous sodium chloride and liquid water. Suppose 34. g of hydrochloric acid is mixed with 9.30 g of sodium hydroxide.
How did the colonist use it to get more support for their rebellion
Is 7/8 greater than 3/4
What is the molar mass of C2H6O
True Flight Golf manufacturers a popular shaft for golf clubs. Its trade secret is a unique process for weaving high-tension wire into the center of the shaft such that energy is accumulated during the swing and released at impact.
⭐️ Computers & Technology
» The scope of a variable declared inside of a function is: a) Local - within that function b) Within that file only c) global