Monday, May 24, 2010

What is main diffrence between 'c' language and ' c++ ' why we use c++ is any logic why we indicate '++ '

For the most part, you can say that C is a subset of C++, meaning that most of the facets of C are also legal in C++.





As others have said, C++ is an object-oriented language, as C is an imperative language. An imperative language is a language built for "top-down" programming. For example, in football, a play is called, the quarterback may audible, the ball is snapped... Step-by-step statements.





In an object-oriented language, you build things in terms of objects. Classes are the blueprints for these objects. An object can be anything, you can have a footballTeam object, a quarterback object.. So you can say, "the quarterback" calls an audible, stressing that "the quarterback" class will provide an action in your program. So, you think in terms of objects when writing code.

What is main diffrence between 'c' language and ' c++ ' why we use c++ is any logic why we indicate '++ '
C has been around for a long time, the 70s/80s. Moving up to the next level of C is shown by incrementing to the "next" level. In both C and C++, incrementing to the next integral value is accomplished by the ++ operator..





So the name wizards decided that to incrementing the C language to the next level would be would easily understood by C programmers if were called C++. Believe it or not, a very early language was A, followed by B and then C.... So instead of going to D, they went to C++...





I am in the embedded world, and C is still the predominate language used there. C++ comes with way too much overhead.


But in the application world, PC and web stuff, C++ has become the language of choice, due to the object oriented nature of itl....
Reply:The main difference between 'C' and 'C++' is that 'C' is a procedural programming language while 'C++' is mainly used for OOP (Object-Oriented Programming).





++ in 'C++' means 'C plus class'
Reply:C++ is a superset of C. There are additional features in it, and it supports object-oriented programming. '++' is a unary operator in C and means to increment. Which is why it has a double meaning in C++.


No comments:

Post a Comment