logo

Crowdly

Browser

Add to Chrome

Чи працюватиме код поданий далі? Якщо так, то який результат його виконання? #i...

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

Чи працюватиме код поданий далі? Якщо так, то який результат його виконання?

#include <iostream>

using namespace std;

struct str

{

char* txt;

int size;

};

void main()

{

str* obj = new str;

obj->txt = new char[20];

strcpy_s(obj->txt,20, "Text from obj");

str* obj2 = obj;

delete obj;

cout << obj2->txt;

delete[] obj->txt;

}

0%
0%
13%
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