C++ Programming - Constructors and Destructors - Discussion
Discussion Forum : Constructors and Destructors - General Questions (Q.No. 9)
9.
When are the Global objects destroyed?
Discussion:
3 comments Page 1 of 1.
Sagar said:
2 years ago
Because when the global variables having the scope to whole the program and when programs are terminated then global variables space are destroyed.
Niladri S said:
1 decade ago
I think @Akash is right. But I would like to expand one thing Global variable has a public visibility label i.e; it is visible to every one whether it is a whole program or between two files. So, when the execution of the program terminates, it is destroyed.
Akash goyal said:
1 decade ago
Global variable are the scope of the whole programs when programs are triminates than global variables space are destroyed.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers