logo

Crowdly

Browser

Add to Chrome

Визначити результат роботи фрагмента програми: void * operator new (unsigned...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

Визначити результат роботи фрагмента програми:

void * operator new (unsigned count, int x)

{

int *p = (int *)calloc(count,sizeof(int));

for(int *q=p; q < p+count; q++) *q=x;

return (void *)p;

}

void main()

{

int *q = new(7) int[4];

for(int * r=q; r < q+4; r++) cout << *r << ' ';

delete [ ]q;

}

0%
0%
0%
0%
More questions like this

Want instant access to all verified answers on vns.lpnu.ua?

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

Browser

Add to Chrome