This is the first C++ Tutorial in which you will see how to print a simple Hello World statement in C Plus Plus and how to run this in your Turbo C++ compiler or IDE. So below is the code for your first C++ program.
// This is the comment which is not included by the compiler.
#include<iostream.h>
int main()
{
cout<<"Hello World!! This is my first C++ Program";
return 0;
}
After writing the above given code in your compiler, you have to save your file with .cpp extension in Turbo C++ and Borland C++, while Zortech C++ compiler uses .cxx extension. A UNIX AT&T version uses .c and .cc extensions.
OUTPUT:
Hello World!! This is my first C++ Program
// This is the comment which is not included by the compiler.
#include<iostream.h>
int main()
{
cout<<"Hello World!! This is my first C++ Program";
return 0;
}
After writing the above given code in your compiler, you have to save your file with .cpp extension in Turbo C++ and Borland C++, while Zortech C++ compiler uses .cxx extension. A UNIX AT&T version uses .c and .cc extensions.
OUTPUT:
Hello World!! This is my first C++ Program
0 comments:
Post a Comment