a) logical_not<T> f;
b) logical_and<T> f;
c) logical_or<T> f;
d) negate<T> f;
1 thought on “Which of the following is an arithmetic unary functor?”
Leave a Comment
You must be logged in to post a comment.
a) logical_not<T> f;
b) logical_and<T> f;
c) logical_or<T> f;
d) negate<T> f;
You must be logged in to post a comment.
d
Explanation: logical_and and logical_or requires two arguments to act upon whereas negate and logical_not requires only one argument but logical_not produces only logical results, therefore, will not work on arithmetic values whereas negate works with all types of values.