Site icon

Write a program class name is hello and displays hello world on the screen.

Write a complete program whose class name is hello and that displays hello, world on the screen.
using namespace std;
// Creating clas
class hello

    void display() {
      cout << "Hello World";
int main()
    hello t4tutorials;    // Creating an object
    t4tutorials.display();  // Calling function
    return 0;


Hello World


Class: hello

user define function: display

built-in  function: main

object: t4tutorials

Exit mobile version