База ответов ИНТУИТ

Программирование на С/С++

<<- Назад к вопросам

<pre> //====================== start of sample.cpp ========================== std::merge( vector1.begin(), vector1.end(), std::istream_iterator(cin), std::istream_iterator(), std::back_inserter(list1) ); //====================== end of sample.cpp ========================== </pre> Который по номеру из параметров из вызова стандартного алгоритма, приведённого выше служит для индикации конца потока?

(Отметьте один правильный вариант ответа.)

Варианты ответа
4(Верный ответ)
1
3
2
5
Похожие вопросы
<pre> //====================== start of sample.cpp ========================== bind2nd(greater&lt;int&gt;(), 100); //====================== end of sample.cpp ========================== </pre> Какие утверждения про приведённый выше адаптер верны?
<pre> //====================== start of sample.h ========================== struct S_EMPTY {}; struct A { int i; double g; }; class B { long jj; public: char _str[6]; private: static char str_4_all[9]; }; union mytypes_t { int i; float f; } My; //====================== end of sample.h ========================== </pre> Доступ к каким из членов класса, описанных в файле sample.h (выше), является закрытым?
<pre> //====================== start of sample.h ========================== struct S_EMPTY {}; struct A { int i; double g; }; class B { long jj; public: char _str[6]; private: static char str_4_all[9]; }; union mytypes_t { int i; float f; } My; //====================== end of sample.h ========================== </pre> Доступ к каким из членов класса, описанных в файле sample.h (выше), является открытым?
<pre> //====================== start of sample.cpp ========================== Декоратор Компоновщик Мост Фасад //====================== end of sample.cpp ========================== </pre> К какой группе шаблонов относятся приведённые выше шаблоны объектно-ориентированного проектирования?
<pre> //====================== start of sample.cpp ========================== template &lt;typename T&gt; class multiplies: public binary_function&lt;T,T,T&gt; { public: T operator() (const T&amp; x, const T&amp; y) const { return x * y; } }; //====================== end of sample.cpp ========================== </pre> Какие утверждения про приведённый выше код функтора multiplies верны?
<pre> //====================== start of sample.cpp ========================== #include &lt;climits&gt; #include &lt;limits&gt; #include &lt;boost/static_assert.hpp&gt; namespace name { BOOST_STATIC_ASSERT(std::numeric_limits&lt;int&gt;::digits == 32); } int main(int argc, char* argv[]) { return 0; } //====================== end of sample.cpp ========================== </pre> Что случится c программой из файла sample.cpp если в системе размер int больше 32 разрядов?
<pre> //====================== start of sample.h ========================== struct A {}; struct B; struct B *pb = 0; struct A *pa = 0; struct B b; struct A a; void foo(const struct B&amp; in_b); //====================== end of sample.h ========================== </pre> Какие присвоения и объявления в файле sample.h валидны?
<pre> //====================== start of sample.cpp ========================== template &lt;typename ForwardIterator, typename T&gt; void replace ( ForwardIterator first, ForwardIterator last, const T&amp; x, const T&amp; y) { while(first != last) { if (*first == x) *first = y; ++first; } return first; } //====================== end of sample.cpp ========================== </pre> Каковы требования к итераторам, участвующим в алгоритме replace(), имплементация которого приведена выше, корректны?
<pre> //====================== start of sample.cpp ========================== int main(int argc, char* argv[]) { int a = 0; int b = 0; int X = 0; auto lf1 = [a,b,X] (int x) {return x > 0;}; auto lf2 = [a,b] (int x) { x++; return x;}; auto lf3 = [=] (int x) { x++; return x;}; auto lf4 = [&amp;] (int x) { x++; return x;}; auto lf5 = [] (bool&amp; z) { z = !z; return;}; return 0; } //====================== end of sample.cpp ========================== </pre> Какие лямбда функции из примера выше имеют доступ к значению переменной X?
<pre> //====================== start of sample.cpp ========================== struct A { A(); virtual ~A(); private: A(A&amp;a); A&amp; operator=(const A&amp; a); }; struct B: public A {}; struct C {}; struct D { D(); D&amp; operator=(const D&amp; d); }; //====================== end of sample.cpp ========================== </pre> Какие из типов из файла sample.cpp удовлетворяют требованию CopyConstructible?