Google News
logo
CPP - Quiz(MCQ)
What is the use of emplace() function in C++?
A)
Used to check the type of any variable
B)
Used to change the object any container is holding
C)
Used to empty any container value
D)
Used to add more item to the any list

Correct Answer :   Used to change the object any container is holding


Explanation : emplace() function is used to change the object contained in any container i.e destroying the present object and creating the new object for the value given by the user.

Advertisement