I don't understand these instructions! :(

The first step of my programming assignment, which is supposed to introduce us to arrays, is as follows:

"Declare an array named tests and initialize 3 elements to Test 1, Test 2, and Test 3. Size the array implicitly."

The only problem is... I don't understand how to do this at all.

I have this:

int Tests [3] = {1, 2, 3};

but I have a feeling that isn't what my instructor is seeking. Please help.
Last edited on
The instructions aren't clear, but what you've done looks ok to me.
Size the array implicitly.
means: int Tests[] = {1, 2, 3}; // Now the compiler evaluates the size of the array

it could also mean const char *tests[] = { "Test 1", "Test 2", "Test 3" };
Okay. Thank you both very much for your help. I don't feel as clueless now.
Last edited on
Topic archived. No new replies allowed.