Top

Discussion

Global variable are available to all functions. Does there exist a mechanism by way of which it available to some and not to others.

  • A.Yes
  • B.No

Answer: B

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.

No comment is present. Be the first to comment.
Loading…

Post your comment