-1
    NSMutableArray *quesArrayForPar0 = [[NSMutableArray alloc] initWithObjects:

[[NSMutableArray alloc] initWithObjects:@"We have a clearly stated vision for the next 5 years.", "-1", nil], 

[[NSMutableArray alloc] initWithObjects:@"Our organization has clearly established strategy to achieve the vision.", "-1", nil],

 [[NSMutableArray alloc] initWithObjects:@"This strategy is implemented uniformly and effectively throughout our organization.", "-1", nil], 

[[NSMutableArray alloc] initWithObjects:@"We are progressing as per our plan to realize this vision within the envisage time horizon.", "-1", nil]

, nil];

I really don't understand why the above code is throwing exception..!

Shradha
  • 991
  • 3
  • 13
  • 38

1 Answers1

3

Because in the inner mutable array you have assign two different objects. One is Obj-C string @"" and other C string "".

So i have changed your code and its working.

NSMutableArray *quesArrayForPar0 = [[NSMutableArray alloc] initWithObjects:
                                    [[NSMutableArray alloc] initWithObjects:@"We have a clearly stated vision for the next 5 years.", @"-1", nil],
                                    [[NSMutableArray alloc] initWithObjects:@"Our organization has clearly established strategy to achieve the vision.", @"-1", nil],
                                    [[NSMutableArray alloc] initWithObjects:@"This strategy is implemented uniformly and effectively throughout our organization.", @"-1", nil],
                                    [[NSMutableArray alloc] initWithObjects:@"We are progressing as per our plan to realize this vision within the envisage time horizon.", @"-1", nil]
                                    , nil];
V.J.
  • 9,492
  • 4
  • 33
  • 49