UMBC CMSC201, Computer Science I, Fall 1994 Section 0101, 0102 and Honors

Final Exam, True/False Section


True or False Questions, 1 point each

To practice taking this section. Select TRUE or FALSE in the pop-up menus after each question to record your answer. To submit your answers for grading, click on the "submit for grading" button.

On lynx, use down arrow to move to the next question or choice. Hit return to make your selection.

  1. An expression has a side-effect if evaluating the expression changes the value of a variable.

    Your answer:

  2. If p is a pointer to the type char, then the expression p = p + 1 adds 1 to the value of p.

    Your answer:

  3. In order to compile a program, the source code for every function called by main must be in the file that contains main or in a header file that is included in the file that contains main.

    Your answer:

  4. To declare an array with 40 double elements, you should use:
          double A[39] ;
          

    Your answer:

  5. To store the string "Bilbo Baggins", you need to allocate 12 bytes of memory.

    Your answer:

  6. If p is a pointer to integer, then the expression &*&*&p is a pointer to a pointer to an integer.

    Your answer:

  7. The expression 13/4.0 has type int.

    Your answer:

  8. If n is an integer variable, then the expression n = 13/4.0 has type int.

    Your answer:

  9. One purpose of function prototypes is to tell the compiler the type of the return value and the formal parameters

    Your answer: of the function.

  10. If p is a pointer to integers and A is an array of integers, then the statement
          p = A; 
          
    assigns the value stored in A[0] to p.

    Your answer:

  11. If n is an integer variable, then the expression n%2 is zero if and only if n is an odd number.

    Your answer:

  12. The compiler directive
          #define RING 1
         
    tells the C preprocessor to replace each occurrence of the constant RING with 1.

    Your answer:

  13. A function is called a recursive function if the function might make a function call to itself.

    Your answer:

To submit this section for grading click here:


Last Modified: Wed Jan 4 11:44:47 EST 1995

Richard Chang, chang@gl.umbc.edu