✅ 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;
} S;
void main()
{
char* ptr = new char[100];
strcpy_s(ptr,100, "Some text");
S.txt = ptr;
delete[] ptr;
cout << S.txt << "\t" << S.size;
}