[ create a new paste ] login | about

Link: http://codepad.org/Ji7cp5oL    [ raw code | output | fork ]

C++, pasted on Jul 21:
1
2
3
4
5
6
7
8
9
10
11
int main()
{
    int *ptr;
    int n = 20;
    ptr = new int[n];
    ptr[5] = 7;
    ptr[6] = 9;
    cout << ptr[5] << " " << ptr[6] << "\n";
    delete[] ptr;
    cout << ptr[5] << " " << ptr[6];
}


Output:
1
2
7 9
-1785358955 -1785358955


Create a new paste based on this one


Comments: