C++
What state ...
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
What statements about predicates and functors are true (indicate all that apply)?
A predicate can only be a structure, and a functor can also be a class.
A predicate is a special case of a functor.
The operator() method of a functor can only return values of type bool.
The operator < must be overriden for functor.
Predicates can be used to sort items in containers.
Explanation
A predicate is a structure, with an overridden
operator ()
, which returns a bool. In the general case (when
operator ()
returns not bool), such a structure is called a functor.
functor
predicate
Like
Login in
to like
Comment
Login in
to comment
Share
Tweet
C
++
Quiz
Login to learn C++
or
Read more about
C++ Quizzes
Follow CodeGalaxy
Mobile Beta
Send Feedback
Sign Up Now
or
Subscribe for future quizzes
Login in to like
Login in to comment