logo

Crowdly

#define main1 main /** Klausimas   Ką atspausdins programa? Jeigu programa nes...

✅ 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;

    }

More questions like this

Want instant access to all verified answers on emokymai.vu.lt?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!