answersLogoWhite

0

C++ was originally called "C with Classes". In the C language, '++' is an operator that increments the operand, thus C++ is a shorthand way of saying C=C+1. In this case the operand is the language name itself, C, thus C++ literally means the "the successor to C".

The ++ operator comes in two varieties: prefix and postfix increment. C++ is the postfix increment version, while ++C would be the prefix increment version. Both will increment the operand, C, however ++C evaluates to the original value of C while C++ evaluates to the incremented value of C. Which you use depends on whether you want the original value or the new value. Either way, C is incremented. Note that when working with an object named C, ++C is more efficient than C++ because C++ must copy the original object in order to return it, whereas ++C just returns the same object (pre-incremented). But with primitives that will fit into a register there is no difference as no copy is actually needed (the result is simply placed in an output register while a working register performs the actual increment).

User Avatar

Wiki User

12y ago

What else can I help you with?