About array !!

What is the difference Between those types of initializing An array called "IntegerArray" With 5 element :

1
2
3
4
     int IntegerArray[5] = {0};
     int IntegerArray[5] = {0,0,0,0,0};
     int IntegerArray[5] = {10,20,30,40,50};
     int IntegerArray[]  = {10,20,30,40,50};


Please i need an obvious explanation for each line as i am confused.....

Thanks for reading...............
There's no difference between 2 and 3 other than the values used.
The first method initializes the first member to 0 and default-constructs the rest (i.e. sets them to 0 as well).
In the fourth line the number of elements is determined automatically.
Thanks ....
Topic archived. No new replies allowed.