logo

Crowdly

Browser

Add to Chrome

Обчислювальна техніка та програмування [04123]

Looking for Обчислювальна техніка та програмування [04123] test answers and solutions? Browse our comprehensive collection of verified answers for Обчислювальна техніка та програмування [04123] at vns.lpnu.ua.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

Якого значення набуде змінна х внаслідок виконання фрагменту С++ коду 

int x = 5, y = (--x)*(x)*(x--)*(--x);

View this question

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

#include <iostream>

using namespace std;

union {

char c[20];

int i;

double d;

} u;

void main()

{

u.i = 10;

cout << sizeof(u);

}

View this question

Що буде виведено на екран внаслідок виконання наступного фрагмента коду:

#include <iostream>

using namespace std;

class A{

int a;

public:

A(int x)

{

a = x;

cout << "A(" << a << ")\n";

}

~A()

{

cout << "~A(" << a << ")\n";

}

};

A f()

{

A a1(123);

return a1;

}

void main(){

f();

}

0%
0%
0%
0%
0%
View this question

Код програми, поданий нижче буде скомпільовано і виконано без помилок

0%
100%
View this question

Код програми, поданий нижче буде скомпільовано без помилок:

#include<iostream>

using namespace std;

 

void main()

{

char str[20] = "Some string";

char * ptr = str + 7;

cout << ptr;

}

 

94%
6%
View this question

Який результат виконання наступного фрагмента коду:

const int n = 3, m = 5;

int m1[n] = { 1, 2, 3 };

int m2[m] = { 4, 5, 6, 7, 8 };

for (int i = 0; i < n; i++)

{

int a = m2[i];

m2[i] = m1[i];

m1[i] = a;

}

for (int i = n; i < m; i++)

m2[i] -= m1[i - n];

for (int i = 0; i < n; i++)

cout << m1[i];

 

for (int i = 0; i < m; i++)

cout << m2[i]; 

View this question

Код програми, поданий нижче ,буде скомпільовано і виконано без помилок:

#include <iostream>

using namespace std;

 

void main()

{

int ** mas = new int*[5];

for (int i = 0; i<5; i++)

{

mas[i] = new int[5];

for (int j = 0; j<5; j++)

mas[i][j] = i * 5 + j;

}

for (int i = 0; i<5; i++)

cout << *&mas[i][i] << '\t';

}

 

0%
0%
View this question

Який результат виконання наступного фрагмента коду:

const double n = 7;

double mas[n];

for (int i = n - 1; i >= 0; i--)

mas[i] = i + 2;

for (int i = 0; i<n; i++)

cout << mas[i];

return 0;

 

View this question

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

#include <iostream>

using namespace std;

struct test {

int a;

double b;

char arr[3];

};

void main()

{

cout << sizeof(test);

}

0%
0%
0%
0%
0%
View this question

Що буде виведено на екран внаслідок виконання наступного фрагмента коду:

#include <iostream>

using namespace std;

class A{

int a;

};

void main()

{

A a1;

a1.a = 10;

cout << a1.a << "\n";

}

0%
0%
0%
0%
0%
View this question

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