1. A destructor function is called automatically when the object goes out of scope: I. the function ends II. the program ends III. a block containing local variables ends A. I , II, III B. I, II, C. Only II D. I , III 2. Which of the following is correct? If C1, C2, C3 are objects of class Complex. Statement C3=C1+C2 may be implicitly converted by compiler as: I. C3=operator+(C1, C2) II. C3=C1.operator+(C2) III. C3=operator+(C2, C1) IV. C3=C2.operator+(C1) A. I , II B. II, IIIC. I, IV D. II, IV 3. Match the following for + overloaded operator Col A Col B I. Unary operator with member function a. operator+(obj1, obj2) II. Unary operator with friend function b. obj1.operator+(obj2) III. Binary operator using member function c. obj1+() IV. Binary operator using friend function d. operator+(&obj1) 4. State true of false We cannot have more than one constructor in a class? 5. The seekg function parameter does not include A. position B. offset C. dir D. file pointe

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter13: Overloading And Templates
Section: Chapter Questions
Problem 15SA
icon
Related questions
Question

1. A destructor function is called automatically when the object goes out of scope:
I. the function ends
II. the program ends
III. a block containing local variables ends
A. I , II, III
B. I, II,
C. Only II
D. I , III


2. Which of the following is correct?
If C1, C2, C3 are objects of class Complex. Statement C3=C1+C2 may be implicitly converted by
compiler as:
I. C3=operator+(C1, C2)
II. C3=C1.operator+(C2)
III. C3=operator+(C2, C1)
IV. C3=C2.operator+(C1)
A. I , II
B. II, IIIC. I, IV
D. II, IV


3. Match the following for + overloaded operator
Col A Col B
I. Unary operator with member function a. operator+(obj1, obj2)
II. Unary operator with friend function b. obj1.operator+(obj2)
III. Binary operator using member function c. obj1+()
IV. Binary operator using friend function d. operator+(&obj1)


4. State true of false
We cannot have more than one constructor in a class?


5. The seekg function parameter does not include
A. position
B. offset
C. dir
D. file pointer

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
ADT and Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr