| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. Unordered map is implemented using _________________

Correct Answer is : When a function is declared

2. Map is implemented using ____________________

Correct Answer is : To the rightmost side of the parameter list

3. Which of the following is correct about the map and unordered map?

Correct Answer is : It cannot be modified inside the function

4. Which of the following queue container can expand or shrink from both directions?

Correct Answer is : Abstraction

5. Which of the following is correct about map and multimap?

Correct Answer is : 10

6. Which symbol is used to create multiple inheritance?

Correct Answer is : 5

7. Which of the following advantages we lose by using multiple inheritance?

Correct Answer is : 870

8. Which design patterns benefit from the multiple inheritances?

Correct Answer is : Functors have a state

9. What are the things are inherited from the base class?

Correct Answer is : 5

10. Which operator is used to signify the namespace?

Correct Answer is : 10

11. What is the use of Namespace?

Correct Answer is : Add add_10(10);

12. Which keyword is used to access the variable in the namespace?

Correct Answer is : logical_not f;

13. Pick the incorrect statement for namespaces in C++.

Correct Answer is : negate f;

14. Which operator is used for accessing a member of namespace?

Correct Answer is : f.operator()(arg1, arg2);

15. Which is the correct syntax of declaring a namespace?

Correct Answer is : numeric

16. What will be the output of the following C++ code? #include #include using namespace std; namespace A{   int var = 10; } namespace B{ int cout = 5; } int main() { using namespace B; cout<
Correct Answer is : blitz++

17. What will be the output of the following C++ code? #include #include using namespace std; namespace A{   int var = 10; } namespace B{ int var = 5; } int main() { using namespace B; cout<
Correct Answer is : Returns the result of accumulating all the values in the range

18. What will be the output of the following C++ code? #include #include using namespace std; namespace A{   int var = 10; } namespace B{ int var = 5; } int main() { int var = 20; using namespace B; cout<
Correct Answer is : 1 1 1 2

19. What will be the output of the following C++ code? #include #include using namespace std; namespace { int var = 10; } int main() { cout<
Correct Answer is : 160

20. What is the correct syntax of defining a namespace?

Correct Answer is : 1 3 6 10 15