What does the program print to the monitor?

Answer:

The variable contains: 123

Assignment Statement Syntax

This program printed out the same thing as the first example program. However, this program did not initialize the variable and so had to put a value into it later.

Assignment statements look like this:

variableName  =  expression ;

In the source file, the statement that declares a variable must occur before any assignment statement that uses that variable.

QUESTION 11:

Is the following correct (assume that sum has already been correctly declared):

sum = 42 - 12 ;