Question: The desired result is to build 10 columns into NSArray. The following works with what looks like the desired result.  

But am I playing with fire here?

```
NSArray **ppp;

int m=10;

ppp = calloc(m, sizeof(NSArray));

ppp[0]=[[NSArray alloc] initWithObjects:
                 @"1",
                 @"2",
                 @"3",
                 ];

ppp[1]=[[NSArray alloc] initWithObjects:
            @"a1",
            @"b2",
            @"c3",
            @"d4",
            nil
            ];

NSLog(@"array test: %@   %@", [ppp[1] objectAtIndex:3], [ppp[0] objectAtIndex:2]);

```

thanks

Answer: 
You should, if you intend to, do 

```
ppp = calloc(m, sizeof(NSArray *));

```

but taking this path will involve manual memory management of the array of arrays. Why don't you use an `NSMutableArray` instance.

```
NSMutableArray * masterArray = [NSMutableArray array];
[masterArray addObject:[[NSArray alloc] initWithObjects:
                 @"1",
                 @"2",
                 @"3",
                 ]];

.....

NSLog(@"array test: %@ ", [[masterArray objectAtIndex:1] objectAtIndex:3]);

```
It should be `sizeof(id)`, but otherwise it's correct code. But there is some "blow-up" potential there, since it will make memory management much more complicated and error-prone then using an NSArray (as C arrays are completely ignorant of Objective-C's memory management requirements). Unless you've profiled and found it necessary, I would question doing this.