Question: Mark the following statements as true or false. a. The function that overloads an operator is called the operator function. (1) b. In C++, all
Mark the following statements as true or false.
a. The function that overloads an operator is called the operator function. (1)
b. In C++, all operators can be overloaded for user-defined data types. (2)
c. In C++, operators cannot be redefined for built-in types. (2)
d. C++ allows users to create their own operators. (2)
e. The precedence of an operator cannot be changed, but its associativity
can be changed. (2)
f. A friend function of a class is a nonmember function of the class, so it
cannot access the members of the class. (4)
g. When writing the definition of a friend function, the keyword
friend must appear in the function heading. (4)
h. In C++, all operators can be overloaded as member functions of a class. (5)
i. Every instance of an overloaded function has the same number of
parameters. (1, 2, 5, 6)
j. It is not necessary to overload relational operators for classes that have
only int member variables. (1, 5, 6)
k. The function heading of the operator function to overload the pre- increment operator (++) and the post-increment operator (++) is the
same because both operators have the same symbols. (6)
l. Templates provide the capability for software reuse. (8)
m. The member function of a class template is a function template. (9)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
