Wyo C++ - Ch. 1 - 5 Practice Test Name -

 

True/False - Circle the false exercise numbers.

  1. Data types that do not accept negative numbers are called unsigned.
  2. The double data type cannot store integer values.

Short Answer - Answer on the back of this worksheet.

  1. What is the decrementing operator?
  2. What is the extraction operator?
  3. What is the multiplication operator?
  4. How many bytes is used to store an int variable?
  5. What decimal value is represented by the binary number 1100?
  6. How many combinations of bits are possible using 5 bits?
  7. List 2 typecast operators.

Write a C++ statement that performs the following task.

  1. Write a declaration statement that declares myDouble as a double variable.


  2. Write a statement that uses a compound operator to subtract 5 from the value of myInt.


  3. Write an assignment statement that assigns the value 5.05 to myDouble.


  4. On the back of this worksheet, write a complete program that obtains integer inputs for the number of wins and losses for the Wyomissing Area High School football team. Compute and display the team's winning percentage to some accurate degree of precision.

Essay - On the back of this worksheet, answer the following essays.

  1. Explain the meaning of overflow in C++. Show your complete understanding by giving a technical description. Draw illustrations to support your answer if necessary.
  2. What is the difference between an interpreted language and a compiled language? Explain thoroughly using examples where possible.