MCQs > IT & Programming > IOS Technical Test > Which code samples will declare a variable inside a block in Objective-C?

IOS Technical Test MCQs

Which of the following code samples will declare a variable inside a block in Objective-C?

Answer

Correct Answer: [participants enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { Person *participant = (Person*)obj; Person *aPerson = nil; if ([participant.gender isEqualToString:@"M"]) { aPerson = participant; *stop = YES; } }]; return aPerson;

Explanation:

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

IOS Technical Test Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

IOS Technical Test Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it