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!

Яке з наступних тверджень неправильне?

(C++)

0%
0%
0%
0%
View this question
Що обчислює цю функцію:

double func (double x, int n) {

if (n == 0) return 1;

if (x == 0) return 0;

if (n> 0) return x * func (x, n-1);

if (n <0) return func (x, n + 1) / x;

}

(C++)

0%
0%
0%
0%
View this question
Для чого призначені маніпулятори потоків введення-виведення?

(C++)

100%
0%
0%
View this question
Відзначте вірне твердження:

(C++)

View this question
Виберіть всі правильні відповіді.

Число -300 можна зберігати в змінної типу

(C++)

0%
0%
0%
0%
0%
View this question
Яке значення буде виведено в стандартний потік в результаті виконання наступного фрагмента програми? 

 struct my

{

int a, b;

} m1;

 int func (my * f)

{

return f-> a + f-> b ++;

}

int main ()

{

m1.a = 2; m1.b = 5;

cout << func (& m1);

return 1;

 }

(C++)

View this question
Якщо функція обчислення суми цілих чисел, що знаходяться між двома заданими (початковий і кінцевий включно), має прототип int sum(int start, int end) , запишіть визначення функції, використовуючи рекурсію:

(C++)

0%
0%
0%
View this question
Результат роботи програми:

#include <iostream.h>

int main ()

{

char A [] = "ABC";

char * U = & A [2];

cout << "\ n" << * U--;

cout << * U--;

cout << * U;

return 1;

}

(C++)

0%
0%
0%
0%
View this question

Які з наведених нижче описів є визначеннями?

(C++)

View this question
struct Semaphor

{ const long power_on: 1;

long red: 1;

long yellow: 1;

long green: 1;

static long is_new_version: 1;

};

int main ()

{

Semaphor my_semaphor = {1};

bool is_red = my_semaphor.red;

long * pyellow = & (my_semaphor.yellow);

bool power_on = my_semaphor.power_on;

int new_version = my_semaphor.is_new_version;

return 0;

}

Які присвоєння бітових полів коректні (і відповідно опису цих полів) файлі sample.cpp?

(C++)

0%
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