C Programming - Declarations and Initializations - Discussion

Discussion Forum : Declarations and Initializations - Yes / No Questions (Q.No. 3)
3.
Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others.
Yes
No
Answer: Option
Explanation:
The only way this can be achieved is to define the variable locally in main() instead of defining it globally and then passing it to the functions which need it.
Discussion:
11 comments Page 2 of 2.

Pooja patil said:   6 years ago
By using static we can declare the variable which can use in only this file so other files cannot access.
(1)


Post your comments here:

Your comments will be displayed after verification.