Rev A CSC126

Lab2

 

  1. What are the following operations in C++ programming equal to?
    1. 9 / (-6) =
    2. (-9) / 6 =
    3. 9 % (-6) =
    4. (-9) % (6) =
  2. Write a program that writes out the above 1 to 4 mathematical operations and solves the equations.
  3. What is the following binary numbers equal to in decimal?
    1. 001=
    2. 1=
    3. 01=
    4. 110=
    5. 101=

    3A. Write a program that calculates the decimal values for the binary numbers given above in question 3.

  4. What is the largest 4 bit binary number?
  5. For a 30 gigabyte memory how many
    1. Megabytes?
    2. Kilobytes?
  6. What memory does a program have to be loaded into in order to be executed from?
  7. In the C++ templates we have already studied which file(s) are added by executing the build command?