All applications process data. Data comes in, data is processed, and data goes out.
Data usually comes into our program from files, databases, or user input. Data can be put temporarily in variables that will be stored in the memory of the running program. When the program ends, the data in memory is lost. Data is usually output to files and databases, or to the screen or a printer.
When using variables, you should think about, first, how much space it takes in memory, and, second, how fast it can be processed.
We control this by picking an appropriate type. You can think of simple common types such as
double as being different size storage boxes. A smaller box would take less memory but may not be as fast at being processed. ...