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
scope
:
Content language: Русский
English
Скомпилируется ли следующий код: int a = 0; double b = 0.0; namespace space1 { int a=1; double b=1.0; } namespace space2 { int a=2; double b=2.0; } int main() { int a=0; double b=0.0; return 0; }
scope
Скомпилируется ли следующий код? namespace { void Foo() { } }
scope
содержит ли этот код ошибки? void Test() { try { int i = 10, j = 20; // 1 throw int(10); // 2 } catch (...) { // 3 i = 20; // 4 int j = 20; // 5 } }
scope
Область видимости переменной, объявленной внутри блока, распространяется…
scope
Что будет выведено на терминал в результате выполнения следующего кода: #include <iostream> using namespace std; int main() { int i = 0; while(i < 10) { int i = 10; cout<<i<<endl; i++; } return 0; }
scope
Каким будет результат выполнения? console.log(a); var a = "a"; function b(){ console.log(a); var a = "a1"; console.log(a); } b();
scope
Что будет выведено ? #include <iostream> const int SIZE = 5; struct tester { void foo() { std::cout << SIZE << std::endl; } enum { SIZE = 3 }; }; int main(int argc, char** argv) { tester t; t.foo(); return 0; }
scope
Для данной инициализации переменной и класса, скомпилируется ли код? int AnyName; class AnyName;
scope
Для даных класов в C++, что выведется на экран? #include<iostream> using namespace std; class A{ public: A(){cout<<"A";} }; class B{ public: B(){cout<<"B";} }; class C{ public: C(){cout<<"C";} }; A a; int main(){ B b; return 1; } C c;
scope
В каком месте можно использовать переменную 'y' ? int main(int argc, char** argv) { if ( argc > 2 ) { } else if (int y = argc - 1) { // 1 } else { // 2 } // 3 return 0; }
scope
← Prev
1
2
Next →
Sign Up Now
or
Subscribe for future quizzes