Tuesday, September 9, 2008
Microsoft MCSE certification Exam 70-292
The scope of a variable 70-271 should be contrasted with its lifetime. In the program above called `Confusing Scope Program' the first variable `i' goes out of scope for a time but it remains in existence, thus its lifetime is continuing while it is out of scope. In older programming languages, 70-290 it is difficult to contrive examples where scope and lifetime are different - in general in these older languages the two are the same, so lifetime equals scope. Not only is it difficult, it is not all that useful in the general case when it does occur. In recently created computer languages like C++ however, the idea of having variables that are out of scope but 70-292 still alive is heavily exploited and creates the principle distinguishing feature of C++: the C++ class. This is the above program re-written with a class:
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment