Wyo C++ Ch. 5 Worksheet #1 Name -

1. List the five most common arithmetic operators.

 

2. Write a valid line of code which uses a compound operator.

 

3. Identify the output of this program - without using the Visual C++ compiler:

#include <iostream.h>

int main( )
{
    int a = 0;
    int b = 0;
    int c = 0;

    a++;
    b--;
    c = b - 1;

    cout << a << endl << b << endl
           << c << endl;

    return 0;
}

4. What is the value of this expression:      5 + 2 * 3 % (10 / 2)

 

 

5. What is the final value of round?


double initial = 5.9;
round = int (initial);