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
Какими способами в C++ могут передаваться параметры в функцию?
functions
Что произойдёт при попытке откомпилировать и запустить код? #include <iostream> using namespace std; int preinc(int &x) { return ++x; } int postinc(int &x) { return x++; } int main(void) { int x = 5; cout << preinc(x); cout << postinc(x); cout << x; return 0; }
functions
есть ли ошибки в этом коде? class A { int a; public: static int GetA() { return a; } };
functions
Что будет выведено на экран? #include <iostream> class A { public: A(void){this->_num=0;} int A(int num){this->_num=num;} ~A(void){std::cout << this->_num;} private: int _num; }; int main(void) { A val(100); return 0; }
functions
Скомпилируется ли следующий код: int foo(); char foo();
functions
#include <iostream> using namespace std; const int &test() { static int a=3; return a; } int main() { test()++; test()++; cout << test() << endl; return 0; } Что выведет cout?
functions
Что будет напечатано в результате компиляции и выполнения следующего кода? #include <iostream> class A { public: int k; void SetCount() { static int n = 0; k = n++; }; }; int main() { A *pA = new A(); pA->SetCount(); std::cout<<pA->k; delete pA; pA = new A(); pA->SetCount(); std::cout<<pA->k; A a; a.SetCount(); std::cout<<a.k; delete pA; return 0; }
functions
Являются ли конструкторы и деструкторы методами класса?
functions
Содержит ли этот код ошибки компиляции? class A { static void Foo(); }; static void A::Foo() { }
functions
Какой из двух классов занимает больше памяти в C++: class A{ int i; int foo(int a); }; Class B{ int i; virtual int boom(int b); };
functions
← Prev
1
2
3
4
5
Next →
Sign Up Now
or
Subscribe for future quizzes