/* This program demonstrates: * 1. Using cout to print literals, variables and text prompts for clarity * 2. Declaring, initializing and using variables of different primitve types * 3. The 3 numerical integer types - short, int and long * 4. Different ways of representing an integer - decimal, octal, hexadecimal * * Variables: * Declaring a variable is us telling C++ to make room in memory to * hold a value. Variables have 5 properties - name, type, size, value * and address. * The name of a variable is an identifier. Follow rules and conventions * for naming identifiers. * The identifier is just the "word" we use to refer to the value in * the variable. Conventionally, it makes sense in context, but it doesn't * have to, in order to just produce the required output. * Initialization is giving the variable its first value, this value may * change later. If we do not initialize variables, the leftover "junk" * value might bleed into our program and produce the wrong result. */ #include using namespace std; int main() { int num; // declares a variable num = 10; // initializes it - gives it the first value cout<<"num: "<< num <