Explanation: the function add () is called first since it is within the bracket. the function str () is then called on the object that we received after adding a and b.
Q. Let A and B be objects of class Foo. Which functions are called when print(A + B) is executed?
β
Correct Answer: (A)
add (), str ()
Explanation by: Mr. Dubey
the function add () is called first since it is within the bracket. the function str () is then called on the object that we received after adding a and b.
Discussion
Question Analytics
889
Total Visits
3 y ago
Published
Mr. Dubey
Publisher
87%
Success Rate