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 ** 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';

 

View this question

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

#include <iostream>

using namespace std;

void main()

{

int rows = 3, cols = 5;

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

int i;

for (i = 0; i<rows; i++)

mas[i] = new int[cols];

cout << mas[i] << "\t";

for (i = 0; i<cols; i++)

delete[] mas[i];

delete[] mas;

}

 

0%
0%
View this question

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

#include <iostream>

#include <stdlib.h>

using namespace std;

 

void main()

{

char str[20];

itoa(65, str, 8);

cout << str;

}

 

50%
50%
View this question

Скільки разів виконається тіло циклу

int j=2; while(j<25) j += j--;

View this question

Скільки разів виконається тіло циклу

for(int a=1; a<22; a++) a *= a;

View this question

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

#include <iostream>

using namespace std;

class A{

int *a;

public:

A(int x)

{

a = new int(x);

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

}

~A()

{

delete a;

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

}

};

A f()

{

A a1(123);

return a1;

}

void main(){

f();

}

View this question

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

int i = 1;

while (i%5 != 0)

{

{

cout << i;

}

i++;

}

return 0;

 

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

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

char str[20] = { 0 }, str2[25];

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

{

str[i] = 'A' + i;

str2[i] = 'a' + i;

}

cout << str << '\t' << str2 << '\n';

 

0%
0%
0%
0%
0%
View this question
При якому значенні змінної y завершиться виконання цикл

у

int y = 101;

for (int x = 1; y > x; y -= x)

{

cout << x<<endl;

x++;

}

View this question

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

int y, x = 1, total = 0;

while (x <= 5)

{

x++;

y = x*x;

total += y;

}

cout << total;

 

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