Say you had 26 eggs:
You fill two containers, which each hold 12 eggs.
that would be 2 * 12 (containers * number each container holds)
Which totals to 24 eggs in containers.
Left over eggs = original number of eggs - eggs you put into containers, or
left over eggs = 26 - 24
left over eggs = 2
Which is a long way around to this answer:
left over eggs = 26 - (2 * 12)
You can't create an array with no size, unless you give the compiler a number it can could up for you. for instance, this is OK:
Code:
char myString[] = { "My Grandfather's clock was too large for the shelf, so it stood 90 years on the floor" };
And you don't have to count up all the char's for the array's size, the compiler will do it for you.
But if you just have
char myString[]
You have an array with no space, and should have a compiler warning at least.
If you put the above phrase into it, it should crash the program, before long.