Test 1 CSCI 130 Summer 2003


  1. (4 points) What is an algorithm? How is an algorithm used to produce a working program?

  2. (6 points) Describe the function of an operating system, compiler and editor.

  3. (6 points) Give the rules for constructing an identifier. Give an example of an identifier that violates each of the rules.

  4. (2 points) Give an example of code that is self documenting.

  5. (8 points) Describe the four basic types that we have studied so far. Give an example of each.

  6. (4 points) Give the basic outline of a c++ program.

  7. (10 points) Write a complete c++ program that given three numbers, finds and prints the average of those numbers.
  8. (10 points) Write a complete c++ program that given a three letter word, stored in a string, prints the word out backwards. (You will probably need to use the substr(s,l) where s is the start of the substring and l is the length of the substring).