--:--









Quiz for Function objects functors

Course: C++ Language | Subject: Unit 11 | Topic: The Standard Template Library (STL)



Logo

Q1: What is a functor in C++ STL?

Logo

Q2: Which operator is overloaded in a functor?

Logo

Q3: What advantage do functors have over function pointers?

Logo

Q4: Which STL algorithm commonly uses functors?

Logo

Q5: What header defines standard function objects like std::plus?

Logo

Q6: Which of the following is a standard unary function object?

Logo

Q7: Which of the following is a standard binary function object?

Logo

Q8: Can functors be passed as template arguments?

Logo

Q9: Which of these is NOT a feature of functors?

Logo

Q10: What does std::bind1st do?

Logo

Q11: What is the main purpose of std::function?

Logo

Q12: Which of the following can be used to create functors easily?

Logo

Q13: Which STL header is needed for std::function?

Logo

Q14: Can functors be used with std::sort?

Logo

Q15: Which keyword is used to make operator() const in functors?

Logo

Q16: Are functors always stateful?

Logo

Q17: What is the benefit of inlining functors?

Logo

Q18: Which of these can be used to create custom comparison logic for sorting?

Logo

Q19: Can functors be templates?

Are you ready to start test? Set your time limit