------------------------------------------------------------------------------
MC logo
Array Error II
[^] 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]
boom2.cpp
/*
 * This program will blow up on most systems, though it might work.
 */

#include <iostream>
using namespace std;

int main()
{
        int *arr;
        int m;

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