What is the output of the following C++ program on a 64-bit system?
#include <iostream>
#include <memory>
int main() {
auto marks = std::make_unique<int[]>(4); // value-initialised: all 0
marks[1] = 80;
marks[3] = 95;
int total = 0;
for (int i = 0; i < 4; ++i) total += marks[i];
std::cout << marks[0] << ' ' << total << '\n';
return 0;
}
make_unique<int[]>(n) value-initialises the elements to 0, and unique_ptr<T[]> provides operator[] and calls delete[].