logo

Crowdly

Browser

Add to Chrome

Об'єктно-орієнтоване програмування (1 курс КН)

Looking for Об'єктно-орієнтоване програмування (1 курс КН) test answers and solutions? Browse our comprehensive collection of verified answers for Об'єктно-орієнтоване програмування (1 курс КН) at moodle.chnu.edu.ua.

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

Який результат буде у наступного виразу?

class A

{CountPass ();

private: short i;

} A1;

friend A :: CountPass ()

{A1.i = 23;}

(C++)

0%
0%
0%
View this question
Керуючись наведеним кодом, визначте, до яких змінним можна звертатися з класу Friend :

class Base

{

public: int a;

protected: int b;

private: int c;

};

class Derived: Base

{

friend class Friend;

int d;

};

class Friend

{

Derived derived;

};

(C++)

0%
0%
0%
0%
0%
View this question
За допомогою механізму friend можна дозволити звернення до внутрішніх елементів класу:

(C++)

0%
0%
0%
View this question
Керуючись наведеним кодом, визначте, до яких змінним можна звертатися з класу Friend :

class Base

{

int a;

public: int b;

protected: int c;

};

class Derived: Base

{

friend class Friend;

int d;

};

class Friend

{

Derived derived;

};

(C++)

View this question

Відзначте правильне визначення сталих(констант)и:

(C++)

View this question

Що буде виведено в результаті

double x = 12.4;

cout << setw ~ << x << setw(7) << setfill ( '*') << "" << endl;

(C++)

View this question
Яке з наступних тверджень помилково?

(C++)

0%
0%
View this question

Яке значення отримає "p [0]" в даному прикладі?

int a [2] [3] = { {1,2,3 }, {7,8,9 } };

int * p = & a [0] [2];

p + = 3;

(C++)

0%
0%
0%
0%
View this question
Якщо є код

double x;

 cin >> x;

 і вводиться " 12-3 ",

 то що буде в змінній x ?

(C++)

View this question
Що буде виведено на екран в результаті роботи програми?

#include <stdio.h>

int a, b, c, d;

void f (int a, int & c, int & d)

{

int b;

a = 5; c = 7; b = 9;

}

int main ()

{

a = 1; c = 1; b = 1;

f (a, c, b);

printf ( "% d |% d |% d", a, c, b);

return 0;

}

(C++)

0%
0%
0%
View this question

Want instant access to all verified answers on moodle.chnu.edu.ua?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome