Question 1
Back to Exercise
What does typedef int Score; do?
- A Creates a new type that cannot mix with int
- B Creates the alias Score for int; Score and int are the same type Correct
- C Declares a variable named Score
- D Defines a macro
Correct Answer: Option B
typedef only adds a name. A Score is an int in every way – it converts, compares and mixes with int without any cast.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!