Arrays are an important data structure in any language. Objective-C is no different. Here are the essential elements for dealing with them.


Long-Term Learning

Learn efficiently and remember over time.

Start Long-Term Learning

Get personalized study reminders at intervals optimized for better retention.
Track your progress on this set by creating a folder
Or add to an existing folder

Add this set to a folder

  • An array is a _____ object.


    An array is an _____ list of objects, and these objects may be accessed by an _______


    An NSArray is _____ which means you cannot add or remove objects after the array is instantiated


    NSMutableArray lets you add or remove objects ______


    When an object is added to an array, it is actually the _____ of that object in memory that is stored in the array


    Primitives and C structures ____ be added to an array


    A single array ____ contain objects of different types


    You have an array called 'a'. Write a statement using message notation that stores the number of objects stored in 'a' as 'numberOfObjects'

    int numberOfObjects = [a count];

    You have an array called 'a'. Write a command to add an object called 'myObj' to the end of the array.

    [a addObject: myObj];

    You have an array called 'a'. Write a command to add an object called 'myObj' to the front of the array.

    [a insertObject:myObj atIndex:0];

    You have an array called 'a'. Write a command to add an empty object to the front of the array.

    [a insertObject: [NSNull null] atIndex: 0];

    You have an array of NSStrings called 'a'. Write a command to retrieve the 3rd string, stored in an NSString called 'myString'. Assume 'a' has at least 3 elements.

    NSString *myString = [a objectAtIndex: 2];

    Please allow access to your computer’s microphone to use Voice Recording.

    Having trouble? Click here for help.

    We can’t access your microphone!

    Click the icon above to update your browser permissions above and try again


    Reload the page to try again!


    Press Cmd-0 to reset your zoom

    Press Ctrl-0 to reset your zoom

    It looks like your browser might be zoomed in or out. Your browser needs to be zoomed to a normal size to record audio.

    Please upgrade Flash or install Chrome
    to use Voice Recording.

    For more help, see our troubleshooting page.

    Your microphone is muted

    For help fixing this issue, see this FAQ.

    Star this term

    You can study starred terms together

    NEW! Voice Recording

    This is a Plus feature