hi,
i have a question about global variables.for example(sorry i just made up its not a good example,the purpose me to understand how it works).i define a global variable its called age;
1-if i use the age again somewhere else(in a function or in the main body).what the age`s value ?i mean will the program hold its first value(20)?or the value after process ?i mean do the global variables always contain their first value?
Code:
#include<iostream>
int age=20;
int main()
{
age=age+2;
return 0;
}
thanks.