Worksheet 3
Transfer your answers to all questions to Chi-Tester.
ONCE YOU START YOUR CHI-
TESTER SESSION, YOU CANNOT CLOSE IT AND RESTART - TRANSFER ALL OF
YOUR ANSWERS TO CHI-TESTER AT ONE TIME.
1.
Based on the following enumeration, what is the value of ERROR?
enum { READ = 2, WRITE = 4, EXECUTE = 8, ERROR };
a.
9
b.
10
c.
11
d.
16
e.
32
f.
The statement will not compile because ERROR is not assigned a value
g.
The statement will not compile because it is missing the enumeration tag.
2.
The following code fragment
int calculate(int x, int y) { . . . }
represents the
a.
the definition of function calculate
b.
a call of function calculate
c.
the declaration (i.e., the function prototype) of function calculate
3.
The following code fragment
int z = calculate(x, y);
represents the
a.
the definition of function calculate
b.
a call of function calculate
c.
the declaration (i.e., the function prototype) of function calculate
1

This ** preview** has intentionally

**sections.**

*blurred***to view the full version.**

*Sign up*