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++)
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++)
(C++)
(C++)
Число -300 можна зберігати в змінної типу
(C++)
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++)
(C++)
#include <iostream.h>
int main ()
{
char A [] = "ABC";
char * U = & A [2];
cout << "\ n" << * U--;
cout << * U--;
cout << * U;
return 1;
}
(C++)
Які з наведених нижче описів є визначеннями?
(C++)
{ 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++)