Without changing the main function modify the following code so that the o/p is
Initialize
Hello world
clean up

#include<stdio.h>
#include<iostream.h>
#include<conio.h>
void main()
{
 cout<<"Hello world";
}

Recommended Answers

All 2 Replies

This sounds like a constructor and destructor problem. Think about how you can get an object of a class to be created whilst adhering to the rules.

>Without changing the main function modify the following code so that the o/p is
Okay, done. Show me yours and I'll show you mine.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.