✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.
#define main1 main
/** Klausimas
Ką atspausdins programa? Jeigu programa nesikompiliuoja, rašykite ERROR į atsakymo langelį.
*/
#include <iostream>
class X{
public:
int* a;
int _n;
X(int n = 5):_n(n), a(new int[n]){ for(int i = 0; i < n; i++) a[ i ] = i * i + 3 * i; }
~X(){delete[] a;}
};
int main1(){
X x;
std::cout << x.a[ 2 ] - x.a[x._n - 2] << std::endl;
return 0;
}
Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!