Exam-style question
Try this first
Which statement about first-class objects is correct?.
- A.Only functions can be first-class objects
- B.First-class objects may appear in expressions
- C.First-class objects cannot be assigned to variables
- D.First-class objects must always be floating-point values
Model answer
What a good answer should say
- First-class objects may appear in expressions
Explanation
Why this works
The specification states that first-class objects or values may appear in expressions. It also gives integers, floating-point values, characters and strings as examples in many languages.
Common mistake
No common mistake is linked to this question yet.
