/* testarr03.cpp CIS 150 06/23/2005 David Klick Demonstration of array auto-sizing. */ #include using std::cout; int main(void) { // C++ will automatically make array large // enough to store initializtion list items. int nums[] = { 1, 2, 3, 4, 5 }; int i; // display array elements (only 5 now) for (i=0; i<5; i++) { cout << nums[i] << " "; } cout << '\n'; return 0; } /* Sample output: 1 2 3 4 5 */