Interview after being Laid Off || First Interview || EY|| Bengaluru || Senior software engineer
Anonymous User
525
Interview was schedule for 30 mins.
- Write syntax for dynamic cast in C++. Why it is used?
A* a = new B();
B* b = dynamic_cast<A*>(a); - Create vector for storing the shared ptr.
vector<shared_ptr> v1;
for(int i = 0; i < 10; i++)
{
v1.push_back(make_shared());
} - Can we use move pointer in case of singletion class?
Using move semantics for a singleton could potentially lead to unexpected behavior and violate the principle of having a single, globally accessible instance. Therefore, it's generally best to rely on the intended access methods provided by the singleton class itself rather than moving its instance pointer. - Difference between vector and list?
vector->array, list->linked list
- Difference between multimap and unordered map?
hash and RBT
- What is virtual constructor?
There is no virtual constructor in C++.
Comments (0)


