Quizzes
Site Language: English
Українська
English
Русский
Programming Tests
Login
Sign Up
Programming Tests
Theory
Snippets
Papers
Landing
Android
Prices
FAQ
Cosmo Story
Terms and Conditions
Privacy Policy
Cookies Policy
Send Feedback
functions
:
Content language: Русский
English
Что будет выведено на экран? #include <iostream> void func(int a, int b, int c, int d) { std::cout << a << b << c << d; } int main() { int a = 0; func(++a, a++, ++a, a++); return 0; }
functions
Что будет выведено в результате выполнения кода: #include "stdio.h" int foo(int a, int b) { int c; c=a+b; } int main() { printf("ret=%d", foo(5,6)); return 1; }
functions
Что будет выведено на экран в результате выполнения следующего кода? #include <iostream> using namespace std; class ABase { public: void f(int i) const { cout << 1;} void f(char ch) const { cout << 2; } }; class BBase { public: void f(double d) const { cout << 3;} }; class ABBase : public ABase, public BBase { public: using ABase::f; using BBase::f; void f(char ch) const { cout << 4; } }; void g(ABBase& ab) { ab.f('c'); ab.f(2.5); ab.f(4); } int main() { ABBase ab; g(ab); }
functions
Каким будет результат выполнения следующего кода: #include "stdio.h" class Counter { public: void Count() { printf("%d", 1); } }; int main() { Counter obj; obj.Count(); return 0; } void Counter::Count() { printf("%d", 2); }
functions
Что будет выведено на экран в результате выполнения следующего кода? #include <iostream> using namespace std; class ABase { public: void f(int i) const { cout << 1;} void f(char ch) const { cout << 2; } }; class BBase { public: void f(double d) const { cout << 3;} }; class ABBase : public ABase, public BBase { public: void f(char ch) const { cout << 4; } }; void g(ABBase& ab) { ab.f('c'); ab.f(2.5); ab.f(4); } int main() { ABBase ab; g(ab); }
functions
Что напечатает следующий код: #include "stdio.h" class Super1 { public: void Count() { printf("%d", 1); } }; class Super2 { public: void Count() { printf("%d", 2); } }; class Child : public Super1, Super2 { }; int main() { Child obj; obj.Count(); return 0; }
functions
Какой метод будет вызван? class A { public: virtual int function () { return 1; } int get() { return this->function(); } }; class B: public A { public: int function() { return 2; } }; #include <iostream> int main() { B b; std::cout << b.get() << std::endl; return 0; }
functions
Если класс имеет хотя бы один абстрактный метод (чисто виртуальная функция), то такой класс называется:
functions
Содержит ли следующий код ошибки (компиляции, выполнения, линковки, UB): template <int T> void f(); template <> void f<0>() {} void Test() { f<1>(); }
functions
Какой будет вывод следующей программы? #include <iostream> template<class T, T t = T()> class A { private: template<bool b> class B { public: static const int m_n = b ? 1 : 0; }; public: static const int m_value = B<(t > T())>::m_n - B<(t < T())>::m_n; }; int main() { std::cout << A<int, -9>::m_value << A<bool, true>::m_value << A<char>::m_value << std::endl; return 0; }
functions
← Prev
3
4
5
6
7
Next →
Sign Up Now
or
Subscribe for future quizzes