Variables

  • Variables are generally used to hold the result of computations. They can hold numbers, fractions, letters, etc.
  • A simple variable can only hold one value at a given time. The next time you modify it, the old value is gone, replaced by the new one.
  • In C/C++, each variable has a type. Variable type determines what kind of data can be stored into the variable. For example: Integer variables may only store integer values.
  • Let's look at the following example:

 


Where to go

Chapter 2
News Page
Lesson 1 contents
Contacting Me


Roby Joehanes © 2001

Hosted by www.Geocities.ws

1