Thursday, 2 July 2015

what is difference between c and c++?

                                                                 

                                            C++





 c ++(pronounced as cee plus plus, /ˈs plʌs plʌs/) is a general-purpose programming language. It has imperative, object-orientedand generic programming features, while also providing facilities for low-level memory manipulation.

It is designed with a bias toward system programming and embedded, resource-constrained and large systems, with performance, efficiency and flexibility of use as its design highlights.[3] C++ has also been found useful in many other contexts, with key strengths being software infrastructure and resource-constrained applications,[3] including desktop applications, servers (e.g. e-commerce,web search or SQL servers), performance-critical applications (e.g. telephone switches or space probes), and entertainment software.[4] C++ is a compiled language, with implementations of it available on many platforms and provided by various organizations, including the FSFLLVMMicrosoft and Intel.
C++ is standardized by the International Organization for Standardization (ISO), with the latest (and current) standard version ratified and published by ISO in December 2014 as ISO/IEC 14882:2014 (informally known as C++14).[5] The C++ programming language was initially standardized in 1998 as ISO/IEC 14882:1998, which was then amended by the C++03, ISO/IEC 14882:2003, standard. The current C++14 standard supersedes these and C++11, with new features and an enlarged standard library. Before the initial standardization in 1998, C++ was developed by Bjarne Stroustrup at Bell Labs since 1979, as an extension of the C language as he wanted an efficient and flexible language similar to C, which also provided high-level features for program organization.
Many other programming languages have been influenced by C++, including C#Java, and newer versions of C (after 1998).

                                operator of c++


Increment and decrement operators are unary operators that add or subtract one from their operand, respectively. They are commonly implemented in imperativeprogramming languagesC-like languages feature two versions (pre- and post-) of each operator with slightly different semantics.
In languages syntactically derived from B (including C and its various derivatives), the increment operator is written as ++ and the decrement operator is written as --.
The increment operator increases the value of its operand by 1. The operand must have an arithmetic or pointer data type, and must refer to a modifiable data object. Similarly, the decrement operator decreases the value of its modifiable arithmetic operand by 1. Pointers values are increased (or decreased) by an amount that makes them point to the next (or previous) element adjacent in memory.
In languages that support both versions of the operators, the pre-increment and pre-decrement operators increment (or decrement) their operand by 1, and the value of the expression is the resulting incremented (or decremented) value. In contrast, the post-increment and post-decrement operators increase (or decrease) the value of their operand by 1, but the value of the expression is the operand's original value prior to the increment (or decrement) operation. In languages where increment/decrement is not an expression (e.g. Go), only one version is needed (in the case of Go, post operators only).
Since the increment/decrement operator modifies its operand, use of such an operand more than once within the same expression can produce undefined results. For example, in expressions such as x − ++x, it may not be clear to a user in what sequence the subtraction and increment operations should be performed. Such expressions generally invoke undefined behavior, and should be avoided.onlinenotesforeng.blogspot.in

No comments:

Post a Comment