Question 8: In which of the following scenarios is a Copy Constructor called or invoked?
2010-11-30 10:51
701 查看
A. When no conversion function exists for converting the class object to another class object
B. When an existing object is assigned an object of its own class
C. When a function receives as an argument, an object of the class, by value
D. When a function returns an object of the class by value
E. When creating an object and initializing it with an object of its own class
C D E
B. When an existing object is assigned an object of its own class
C. When a function receives as an argument, an object of the class, by value
D. When a function returns an object of the class by value
E. When creating an object and initializing it with an object of its own class
C D E
相关文章推荐
- Question 12: In C++, which of the following is the best declaration for an overloaded operator[] to allow read-only access (and
- Question 25: For the code snippet below, which of the following statements provide the correct order of constructor calls when o
- Question 37: In C++, which of the following statements regarding the code below are valid?
- Question 15: Which of the following statements describe the results of executing the code snippet below in C++?
- Question 27: Which of the following reasons describe why a destructor cannot throw an exception in C++?
- The DCOM settings which are independent of whether the PC is in a work group or in a domain
- Question 4: Which of the following statements correctly describe the code below in C++?
- Question 16: Which of the following methods can a developer use to override the default terminate() function in C++?
- Question 6: Which of the following are container adapters in the STL (Standard Template Library) in C++?
- Question 41: Which of the following operators must be overloaded by function objects in the Standard Template Library?
- 异常-----Can't convert the date to string, because it is not known which parts of the date variable are in use. Use ?date, ?time or ?datetime built-in, or ?string.\u003Cformat> or ?string(format) built-
- Question 43: Which of the following define valid string constants in C++?
- Question 17: Which of the following identify const-correctness failures in the C++ program below?
- Question 28: Which of the following statements accurately describe the new[] operator in C++?
- (NOT CLEAR)Question 45: Which of the following options are returned by the typeid operator in C++?
- Question 9: Which of the following statements correctly describe the results of executing the code below in C++?
- (NOT CLEAR)Question 18: In the given C++ code snippet, which of the following statements correctly identify how Mon of enum DOW
- Question 48: In C++, which of the following statements accurately describe a base class destructor calling a virtual function ov
- Question 11: Which of the following statements describe the result when standard new cannot allocate the requested storage in C+
- Question 19: Which of the following are not pre-processor directives in C++?