Answer the following questions true (T) or false (F)

1. It is impossible to get short-circuit behavior for overloaded operator && or operator ||

2. C++ allows overloading of the function application operator ( ). Explain.

1. True
Explanation:
Invocations of overloaded operators are function calls. All the arguments of function calls are evaluated before the function is called, making short circuit evaluation impossible. It is better not to overload the && or || operators.
2. True
Explanation: The function application operator, operator( ) can be overloaded just as any other operator that can be overloaded. The book does not say so here, but this operator must be a member of the class, and must not be static.

Computer Science & Information Technology

You might also like to view...

Where are apps written for Android sold and deployed?

A. App Store B. iTunes C. Google Play D. Mobile Mall

Computer Science & Information Technology

A ________________ page is a page that appears when a visitor reaches a website by clicking a link, advertisement, or search result

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology