Discussion
An external variable
Answer: D
Correct answer: all of these
All three statements describe an external variable. It has file scope and external linkage, so it is accessible from every function in the program, including functions in other translation units that declare it with extern.
It has a declaration, and it has static storage duration, so if no initialiser is given it is zero-initialised before the program starts rather than holding a garbage value. That last property distinguishes it sharply from an automatic variable, whose uninitialised value is indeterminate.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development