A. Cannot mix omitted and required labels in parameters
B. Missing argument label for denominator
C. No error, code runs fine
D. Missing argument label for numerator
Solution
Step 1: Analyze parameter labels
The first parameter uses underscore, so no label needed. The second requires label denominator.
Step 2: Check function call
The call uses divide(10, denominator: 2), which matches the parameter labels correctly.
Final Answer:
No error, code runs fine -> Option C
Quick Check:
Underscore omits first label, second label required [OK]
Hint: First param no label, second param label required [OK]
Common Mistakes:
Expecting both labels omitted
Trying to omit second label incorrectly
Confusing parameter order
5. You want to write a Swift function formatDate that takes a Date and a String format. You want to call it like formatDate(myDate, "yyyy-MM-dd") without argument labels. Which function declaration is correct?