MCQs > IT & Programming > Swift > Incorrect statements regarding closures in Apple Swift? 1. In Apple Swift, a closure can capture all the references to variables from the surrounding context in which it is def‌ined, but cannot capture references to constants.

Swift MCQs

Which of the following statements are incorrect regarding closures in Apple Swift?

1. In Apple Swift, a closure can capture all the references to variables from the surrounding context in which it is def‌ined, but cannot capture references to constants.

2. A nested function is a closure that has a name but it cannot capture any value from its enclosing function.

3. A global function is a closure that has a name and does not capture any value.


Answer

Correct Answer:

Only1 and 2 

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Swift Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it