------------------------------------------------------------------------------
MC logo
Array Error III
[^] CSc 220 Home
------------------------------------------------------------------------------
[Introduction] [Boolean and Control] [Functions] [Arrays and Pointers] [Dynamic Arrays] [Array Errors] [Command Array] [Standard Containers] [Structs and Classes] [Automatic Pointer] [Multi-File Programs] [Copying Objects] [Templates] [Inheritance] [Plain C I/O] [Type Odds And Ends] [Plain C Strings] [File I/O]
[Array Error I] [Array Error II] [Array Error III]
boom3.cpp
/*
 * This program will blow up on some systems.  It's more interesting
 * when it doesn't
 */

#include <iostream>
using namespace std;

int main()
{
        int a;
        int arr[4];
        int z;
        int m;

        a = 99;
        z = 100;
        for(m = 0; m < 10; m++) arr[m] = 2*m - 1;
        for(m = 0; m < 10; m++) cout << arr[m] << " ";
        cout << endl << a << " " << z << endl;
}