Which of the following is an arithmetic unary functor?

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?”

  1. 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.

Leave a Comment