(a)
new a[10] = { 1, ... };
(b)
new b[10] = { 1, 2, ... };
(c)
new d[10] = { 10, 9, ... };
Example 5: (a) Filling all 10 elements of the array with 1s; (b) filling with the range 1 to 10; (c) filling with the range 10 to 1.
Back to Article
Copyright © 1999, Dr. Dobb's Journal