Tuesday, November 30, 2010

Initialization

Five elements are initialized to zero here: {int x[5] = {0};}

The first one is set because you specified the {0} initializer. The other four are set to zero, just because you specified an initializer. If you did not specify an initializer, the array would have random values in it.

No comments:

Post a Comment