/* testarr01.cpp CIS 150 06/17/2008 David Klick Demonstration of array declaration which also shows that the array elements are not initialized by default. */ #include using std::cin; using std::cout; void cont(); int main() { // declare array int nums[10]; int i; // display array elements for (i=0; i<10; i++) { cout << nums[i] << '\n'; } cout << '\n'; cont(); return 0; } /* void cont(); Arguments: none Returns: nothing Clears input buffer and pauses waiting for user to press Enter. */ void cont() { if (cin.rdbuf()->sungetc() != -1 && cin.get() != '\n') cin.ignore(80,'\n'); cout << "Press enter to continue..."; cin.get(); } /* Sample output: 2293600 2009196833 2293648 4198456 2147348480 0 2293648 4265794 4415488 4415488 */