C++
Among the ...
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
Among the listed types of standard library select the associative containers:
vector
map
multiset
list
stack
deque
multimap
Explanation
Get an explanation when it's available:
Subscribe
containers library
std
associative containers
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
Related Content
Что будет выведено данной программой, если с консоли ввести 3 значения: 1, 2 и 3? #include <iostream> #include <string> #include <map> using namespace std; int main() { string s; map<string, int> m; while (cin >> s) { m[s] = m.size(); } for (map<string, int>::iterator i = m.begin(); i != m.end(); ++i) { cout << i->second << " "; } return 0; }
Какие контейнеры могут быть реализованы на основе красного-черного дерева:
Какой контейнер необходимо использовать для быстрого получения (с логарифмической сложностью) значения по ключу? Ключ типа int, значение типа string.
Что произойдет в результате компиляции данного кода? (С++11) #include <iostream> #include <array> using namespace std; int main() { array<int> a{1, 2, 3, 4, 5}; for(auto& rit: a) ++rit; for(auto rit: a) cout << rit; }
Что будет выведено на экран? #include <iostream> #include <map> int main(void) { std::map<int, int> dict; dict[0]=10; if(dict[0]!=dict[1]) dict[2]=100; std::cout << dict.size(); return 0; }
C
++
Quiz
Login to learn C++
or
Read more about
C++ Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Keep exploring
C++ quizzes
int main() { const int* i = int(); // 1 int const* j = int(); //2 int* const k = int(); //3 int* l(); //4 ++i; //5 ++j; //6 ++k; //7 ++*k; //8 ++l; //9 } Откомпилируется ли такой код? Если нет, то в каких строчках будут ошибки компиляции? После стандарта C++14.
Какой результат работы программы? #include <iostream> using namespace std; void f(double) { cout<<"f1"<<endl; } void f(const int ) { cout<<"f2"<<endl; } void f( int & ) { cout<<"f3"<<endl; } void main(void) { int n = 1; double b = 2; f(n); f(b); }
#include <iostream> using namespace std; int &test() { static int a = 3; return a; } int main() { ++++++test(); cout << test() << endl; return 0; } Что выведет cout?
При истинности какого из приведенных высказываний имеет смысл вычитание указателей?
Какое ключевое слово используется для описания пространства имен?
В чем разница между X x; и X x(); ?
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment