CS @ CCSF: Prerequisite Challenge Exam Sample Questions for CS 110C

1) Consider the following code:

typedef int * intPtr;
intPtr p;
int a;

Which one of the following results in p pointing to a?

  1. p = a;
  2. p = &a;
  3. p = *a;
  4. p &= a;
  5. p *= a;

2. Which one of the following statements is true?

  1. Functions may be overloaded, but operators may not be overloaded.
  2. Operators may be overloaded, but functions may not be overloaded.
  3. Functions and some operators may be overloaded.
  4. Functions and all operators may be overloaded.
  5. Neither functions nor operators may be overloaded.

Answers: 1-b, 2-c

Return to the CCSF Computer Science Department Home Page