Hello World: // File name: hello_world.cpp // A simple C++ program which prints "Hello World!" on the screen. #include <iostream> // header file to support the C++ I/O system. using namespace std; // telling the compiler to use namespace "std", // where the entire C++ library is declared. int main() { cout << "Hello World!" << endl; /* * cout is the standard output device on the screen. * << causes the expression on its right to be directed to the device on its left. * return 0; indicates the successful termination of the "main" function. */ return 0; } Output: Hello World! Variables And Constants: // File name: variable.cpp // Demonstrate the use of variables and constants. #include <iostream> using namespace std; const int CONST_VAL = 5; // declaring a constant. Its value can't be changed.