Changing a Variable after assigning a value - C++ Language Basics

C++ examples for Language Basics:Variable

Description

Changing a Variable after assigning a value

Demo Code

#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; 
}

Result


Related Tutorials