Playground
#include <iostream> #include <new> using namespace std; int main() { int N = 200000000; int *parr = new (nothrow) int[N]; //~750MB memorija if (!parr) //parr == 0 { cout << "Greshka: Nema dovolno memorija!" << endl; return 0; } parr[N-1] = 3; cout << parr[N-1] << endl; delete [] parr; return 0; }
Input data
Program output
no input
Execute
Language: ????????? | Memory: ???? KB | Time: ??? ms
Nothing has been executed, yet!