1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
aksik [14]
3 years ago
6

Given the class definition: class CreateDestroy { public: CreateDestroy() { cout << "constructor called, "; } ~CreateDestr

oy() { cout << "destructor called, "; } }; What will the following program output? int main() { for ( int i = 1; i <= 2; ++i ) CreateDestroy cd; return 0; }
A. constructor called, destructor called, constructor called, destructor called,
B. constructor called, constructor called,
C. constructor called, constructor called, destructor called, destructor called,
D. Nothing
Computers and Technology
1 answer:
Vilka [71]3 years ago
5 0

Answer:

(A)constructor called, destructor called, constructor called, destructor called.

Explanation:

In the class definition we have created a constructor which prints constructor called and a destructor which prints destructor called.Since the class contains default constructors and destructors but when we define constructor and destructor in the class defaults are removed from the class.In the code the loop is running 2 times creating a object so constructor is called when that iteration finishes it deletes that object so destructor is called and it is happening 2 times.

You might be interested in
__________ is a term used to indicate any unwanted event that takes place outside normal daily security operations. This type of
Delvig [45]
The answer is “a security event”
6 0
3 years ago
For businesses and organizations under recent compliance laws, data classification standards typically include private, confiden
Mnenie [13.5K]
Answer: True






Explanation:
6 0
3 years ago
Ted wants to share some information with his team. Match the levels of information with the content of the information that Matt
myrzilka [38]

The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

<h3>What do you mean by information?</h3>

Information is known to be data or any form of stimuli that connote a given meaning in some context to its receiver.

Hence, The  Match up of the levels of information with the content of the information that Matt has shared are:

The nice to know - Ted makes an announcement of the total annual profit of the company.

The  should know - Ted gives his team a brief of the email etiquette for them to follow.

The  must know - Ted informs his team about the office work hours and dress code.

Learn more about information from

brainly.com/question/4231278

#SPJ1

6 0
2 years ago
What is the likely long-term consequence of an increase in the relative percent of greenhouse gases in Earth’s atmosphere?
NemiM [27]

Answer:

Earth's average temperature will increase.

Explanation:

5 0
4 years ago
In order, the three-step process of using a file in a C++ program involves
Anna71 [15]

Answer:

c. open the file, read/write/save data, close the file

Explanation:

8 0
4 years ago
Other questions:
  • The mac group does not replace the primary functions of eocs or other dispatch organizations. True or False
    8·1 answer
  • Suppose that we have a set of activities to schedule among a large number of lecture halls, where any activity can take place in
    8·1 answer
  • Does anyone go to connections acadomy​
    7·2 answers
  • Question # 4
    8·2 answers
  • Write code that does the following: opens an output file with the filename number_list.txt, uses a loop to write the numbers 1 t
    8·1 answer
  • The following is a sequence of undo-log records written by two transactions T and U: &lt; START T&gt;; ; &lt; START U&gt;; ; ; ;
    8·1 answer
  • Which actions are available in the Trust Center? Check all that apply.
    8·1 answer
  • Explain two ways by which the calendar meets or fails to meet the criteria of showing the correct data
    7·1 answer
  • Type the correct answer in the box. Spell all words correctly.
    7·2 answers
  • Need answer Asap!!!! Which file type is the best choice if the image will be made into a billboard?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!