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!

Якого значення набуде змінна

x унаслідок виконання фрагменту коду

int x = 7, y=10;

int *px = &x, py = &y;

py = px; *py = 22; *px += 31;

View this question

Задайте відповідність між функціями та їх призначенням

View this question

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

#include <iostream>

using namespace std;

struct P

{

char * str;

int a;

};

P* create() {

P* ptr = new P;

ptr->str = new char[6];

strcpy_s(ptr->str,6, "Hello");

ptr->a = 10;

return ptr;

}

void main() {

P* o = create();

cout << o->str << "\t" << o->a << "\n";

}

View this question

Фрагмент коду, поданий нижче містить "вічний" цикл:

int i = 0, a = 4;

while (i<a)

cout << a - i;

i++;

  
92%
8%
View this question

Який з перелічених операторів є оператором присвоєння в мові С?

 

View this question

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

0%
0%
0%
0%
View this question

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

int i = 2;

while (i<7)

{

if (i != 5)

i++;

else

cout << i++ << " ";

}

 

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(const A &a1)

{

cout << "A(const A" << "&a1)\n";

a = new int(*(a1.a));

}

~A()

{

delete a;

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

}

};

A f()

{

A a1(123);

return a1;

}

void main(){

f();

}

View this question

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

char str[] = "Alphabet - a b c d e f";

char* ptr = strstr(str, "a");

while (ptr)

{

cout << ptr - str << '\t';

ptr = strstr(ptr + 1, "a");

}

 

View this question

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

const int k = 5;

int mas[k] = { 1, 2, 4, 9, 0, 7 };

for (int i = 0; i<k; i += 3)

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

return 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