C++ : Learn to code . history , advantages , disadvantages of C++ language

in #history7 years ago (edited)

Learn to code

Today i am going to tell about  Computer language known as C++.  it's history , uses , advantages ,disadvantages  and a simple program in C++.


  • History 
  • Advantages
  • Disadvantages
  • Simple Program



History :


 The C++ programming language has a history going back to 1979, when Bjarne Stroustrup was doing work for his Ph.D. thesis. One of the languages Stroustrup had the opportunity to work with was a language called Simula, which as the name implies is a language primarily designed for simulations. The Simula 67 language - which was the variant that Stroustrup worked with - is regarded as the first language to support the object-oriented programming paradigm. Stroustrup found that this paradigm was very useful for software development, however the Simula language was far too slow for practical use.



Shortly thereafter, he began work on "C with Classes", which as the name implies was meant to be a superset of the C language. His goal was to add object-oriented programming into the C language, which was and still is a language well-respected for its portability without sacrificing speed or low-level functionality. His language included classes, basic inheritance, inlining , default function arguments, and strong type checking in addition to all the features of the C language .


 The first C with Classes compiler was called Cfront, which was derived from a C compiler called CPre. It was a program designed to translate C with Classes code to ordinary C. 



 In 1983, the name of the language was changed from C with Classes to C++. The ++ operator in the C language is an operator for incrementing a variable, which gives some insight into how Stroustrup regarded the language. Many new features were added around this time, the most notable of which are virtual functions overloading , references with the & symbol, the const keyword, and single-line comments using two forward slashes .

 In 1985, the first edition of the C++ programming language was released, which became the definitive reference for the language, as there was not yet an official standard.The first commercial implementation of C++ was released in October of the same year.

 C++ is standardized by an ISO working group known as JTC1 /SC22 / WG21. So far, it has published four revisions of the C++ standard and is currently working on the next revision,C++2107.In 1998, the ISO working group standardized C++ for the first time as ISO/IEC 14882:1998, which is informally known as C++98. In 2003, it published a new version of the C++ standard called ISO/IEC 14882:2003, which fixed problems identified in C++98.The next major revision of the standard was informally referred to as "C++0x", but it was not released until 2011. C++11 included many additions to both the core language and the standard library .


 Advantages :


  • Object oriented
  • Portable language (writing a program irrespective of operating system as well as Hardware)
  • Low-level language like Assembly language on Machine language called portable.
  • C++ use multi-paradigm programming. The Paradigm means the style of programming .paradigm concerned about logics, structure, and procedure of the program. C++ is multi-paradigm means it follows three paradigm Generic, Imperative, Object Oriented.
  • It is useful for the low-level programming language and very efficient for general purpose.
  • C++ provide performance and memory efficiency.
  • It provides a high-level abstraction.
  • In the language of the problem domain.
  • C++ is compatible with C.
  • C++ used reusability of code.
  • C++ used inheritance, polymorphasm.

With the use of C++ in development of modern games, operating systems, browsers, and much more, it is safe to say that C++ is irreplaceable.

Many major applications like
  • Adobe Products like Photoshop, Illustrator, InDesign
  • Amazon - one of the biggest e-commerce sites
  • Autodesk products for Computer Aided Design
  • Facebook - social networking site are heavy C++ centric product
Moreover, the fact that there’s a huge community improving C++ on every iteration means that it is only expected to be used even more in the coming future. 
 


 C++ job opportunities and salary

C++ developers can expect an average salary yearly 100,000  salary with over 7,700 jobs advertised every month.

The requirement of jobs comes mostly from game development, rendering engines and the windows applications.

Disadvantages :


  • It has less security
  • C++ has a bootable
  • Complex in a very large high-level program.
  • Used for platform specific application commonly.
  • For a particular operating system or platform, the library set has usually chosen that locks.
  • When C++ used for web applications complex and difficult to debug.
  • C++ can’t support garbage collection.
  • C++ is not secure because it has a pointer, friend function, and global variable.
  • No support for threads built in.



Simple program in C++ :

// This symbol(//) is used for comment for single line.

/*  This symbol (start symbol /*  , End symbol*/) is used for multi line comment  */

 

#include <iostream>

using namespace std;


int main()

{

  int n, i;

  bool isPrime = true;


  cout << "Enter a positive integer: ";

  cin >> n;


  for(i = 2; i <= n / 2; ++i)

  {

      if(n % i == 0)

      {

          isPrime = false;

          break;

      }

  }

  if (isPrime)

      cout << "This is a prime number";

  else

      cout << "This is not a prime number";


  return 0;

}

Output
Enter a positive integer: 29

This is a prime number.
 This program takes a positive integer from user and stores it in variable n.Then, for loop is executed which checks whether the number entered by user is perfectly divisible by i or not.The foor loop initiates with an initial value of i equals to 2 and increasing the value of i in each iteration.If the number entered by user is perfectly divisible by i then, isPrime is set to false and the number will not be a prime number.But, if the number is not perfectly divisible by i until test condition i <= n/2 is true means, it is only divisible by 1 and that number itself.So, the given number is a prime number. 







Follow @wajahatsardar

Sort:  

Calling @originalworks :)
img credz: pixabay.com
Nice, you got a 94.0% @mirhimayun upgoat, thanks to @wajahatsardar
Want a boost? Minnowbooster's got your back!

The @OriginalWorks BETA V2 bot has upvoted(0.5%) and checked this post!
Some similarity seems to be present here:
http://www.cplusplus.com/info/history/
This is an early BETA version. If you cited this source, then ignore this message! Reply if you feel this is an error.

earningbot upvoted with value of 0.02 on behalf of benilda.

Nice post! It shows a good review of classic C++. It does not sound like English is your first language, so I admire you for learning and practicing. Keep it up!

Maybe you will do C# next? Java would probably be the next logical, historically accurate language to review. C# is the best of both world's and my favorite!

yes English is not my first language but i am working on it to improve..

thanks for your complement. i,ll do on java next because i don,t know about c# and i dont know any thing about c#

Sounds great! Here is a funny one for you...

hahhahah thanks bro..

but what i code i know about it :P

i think its a best information about c

wow very nice post