Posts

Writing First C++ Program - Hello World Example

    Writing First C++ Program - Hello World Example    C++ is a widely used Object Oriented Programming language and is fairly easy to understand. Learning  C++ programming can be simplified into:   Writing your program in a text editor and saving it with correct extension( .CPP,   .C ,  .CP ) Compiling your program using a compiler or online IDE Understanding the basic terminologies. The "Hello World" program is the first step towards learning any programming language and is also one of the simplest programs you will learn. All you have to do is display the message "Hello World" on the screen. Let us now look at the program:  CPP 1 2 3 4 5 6 7 8 9 10 11 12 13 14 // C++ program to display "Hello World" // Header file for input output functions #include <iostream> using namespace std ; // Main() function: where the execution of program begins int main ( ) { // prints hello world cout << " Hello World " ; return 0 ;

Introduction to C++ Programming Language

Image
Introduction to C++ Programming  Language C++  is a general-purpose programming language that was developed as an enhancement of the C language to include object-oriented paradigm. It is an imperative and a  compiled  language.    C++ is a middle-level language rendering it the advantage of programming low-level (drivers, kernels) and even higher-level applications (games, GUI, desktop apps etc.). The basic syntax and code structure of both C and C++ are the same.  Some of the  features & key-points  to note about the programming language are as follows: Simple : It is a simple language in the sense that programs can be broken down into logical units and parts, has a rich library support and a variety of data-types. Machine Independent but Platform Dependent : A C++ executable is not platform-independent (compiled programs on Linux won’t run on Windows), however they are machine independent. Mid-level language : It is a mid-level language as we can do both systems-programming (driv