Самые популярные вопросы и ответы для интервью и онлайн-тесты
Образовательная платформа для подготовки к интервью, онлайн-тестов, учебных материалов и живой практики

Развивайте навыки с целевыми маршрутами обучения, пробными тестами и контентом для подготовки к интервью.

WithoutBook объединяет вопросы для интервью по предметам, онлайн-практику, учебные материалы и сравнительные руководства в одном удобном учебном пространстве.

Подготовка к интервью

Пробные экзамены

Сделать домашней страницей

Добавить страницу в закладки

Подписаться по адресу эл. почты

C++ вопросы и ответы для интервью

Test your skills through the online practice test: C++ Quiz Online Practice Test

Связанные сравнения

C vs C++Java vs C++

Вопрос 31. What is a COPY CONSTRUCTOR and when is it called?


A copy constructor is a method that accepts an object of the same class and copies it?s data members to the object on the left part of assignement:

class Point2D{
int x; int y;

public int color;
protected bool pinned;
public Point2D() : x(0) , y(0) {} //default (no argument) constructor
public Point2D( const Point2D & ) ;
};

Point2D::Point2D( const Point2D & p )
{
this->x = p.x;
this->y = p.y;
this->color = p.color;
this->pinned = p.pinned;
}

main(){
Point2D MyPoint;
MyPoint.color = 345;
Point2D AnotherPoint = Point2D( MyPoint ); // now AnotherPoint has color = 345

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 32. What is Boyce Codd Normal form?


A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-> , where a and b is a subset of R, at least one of the following holds:
* a- > b is a trivial functional dependency (b is a subset of a)
* a is a superkey for schema R

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 33. What is virtual class and friend class?


Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 34. What is the word you will use when defining a function in base class to allow this function to be a polimorphic function?


virtual
 

Это полезно? Добавить комментарий Посмотреть комментарии
 

Вопрос 35. What do you mean by binding of data and functions?


Encapsulation.

Это полезно? Добавить комментарий Посмотреть комментарии
 

Самое полезное по оценкам пользователей:

Авторские права © 2026, WithoutBook.