Prerequisite Challenge Exam Sample Questions for CS 110C / CS 270
1) Consider the following code:
typedef int * intPtr;
intPtr p;
int a;
Which one of the following results in p pointing to a?
- p = a;
- p = &a;
- p = *a;
- p &= a;
- p *= a;
2. Which one of the following statements is true?
- Functions may be overloaded, but operators may not be overloaded.
- Operators may be overloaded, but functions may not be overloaded.
- Functions and some operators may be overloaded.
- Functions and all operators may be overloaded.
- Neither functions nor operators may be overloaded.
Answers: 1-b, 2-c
Return to the CCSF Computer Science Department Home Page