-->

WAP to print hello world without namespace.

//program to print hello world without namespace
#include <iostream>//header file
#include<stdlib.h>//header file for system("cls")

                   //no namespace here!
int main()
{
    system("cls");
    std::cout << "Hello world!" << std::endl;//we have used std to handle cout and endl.If we donot use, It will not work.
    return 0;
}

No comments:

Post a Comment