Posts

Showing posts with the label Scope of vaiable

Scope of variables | Practically representation of scope of variables

Details:             It is difficult to understand the scope of variable as from bookish material. I write a program that easily elaborate the concept of scope. Here we discuss global variable and local variable. You just copy it and paste on your compiler and then see what is the difference.... Instructions:               Remember that the compiler is  translated program as a whole program. The control of the compiler is starts from up and terminate at the end of the program. So keep my words and see the magically behavior of compiler towards same name variable "Ali". Source codes: // This is written by "Syed Ali Haider" // Student of Havjery University // Don't remove these line for legal use // Upload on Let's programming by (CEO) // For contact // key_to_programming@yahoo.com # include <iostream> using namespace std; int ali=5; // a global variable ,this...