C++ examples for Language Basics:Variable
Changing a Variable after assigning a value
#include <iostream> using namespace std; int main() /* ww w . j a v a2s . co m*/ { int mynumber; mynumber = 10; cout << mynumber << endl; mynumber = 20; cout << mynumber << endl; return 0; }