Technical Discussion :: C++
Home > Technical Interview Q&A > C++ > Discussion
133 / 187
What are arithmetic function objects?
Answer:
When dealing with numeric classes, it sometimes useful to have the arithmetic function available as function objects. Consequently the standard library provides arithmetic operations.
minus binary arg1 - arg2
multiplies binary arg1 * arg2
divides binary arg1 / arg2
modules binary arg1 % arg2
negate Unary -arg1
Asked In ::
Ranjana R
23 Feb, 2019 5:07 AM
When dealing with numeric classes, it sometimes useful to have the arithmetic function available as function objects. Consequently the standard library provides arithmetic operations.
plus binary arg1 + arg2
minus binary arg1 - arg2
multiplies binary arg1 * arg2
divides binary arg1 / arg2
modules binary arg1 % arg2
negate Unary -arg1
minus binary arg1 - arg2
multiplies binary arg1 * arg2
divides binary arg1 / arg2
modules binary arg1 % arg2
negate Unary -arg1