mcqs bucket

  • MCQs Bucket | Program C++ program to create a simple class and object that print Hello World.

    mcqsbucket

      Best guide for exams of all nature, Competitive exams and Interviews

C++ program to create a simple class and object that print Hello World.

	 
                                 		

#include < iostream >
using namespace std;
class Hello {    
 public: void sayHello()
{
    cout << "Hello World" << endl;
}
};
int main()
{
Hello h;
h.sayHello();
return 0;
}