19
NSMutableArray* abc = [NSMutableArray array];
for (int i = 0; i < 10; ++ i)
[abc addObject:[NSNumber numberWithInt:i]];
return abc;
Here,
-addObject: appends an ObjC at the end of the array.This is actually more similar to the C++ code
std::vector<int> abc;
for (int i = 0; i < 10; ++ i)
abc.push_back(i);
return abc;