answersLogoWhite

0

Efficiency is the same; the difference is when the "++" is evaluated, before or after other operations.

For example:

a = b++ // This will first copy b to a, then increment b.

a = ++b // This will first increment b, then copy it to a.

If you have the "++" operator by itself, it makes no different if you use prefix or postfix. a++ is the same as ++a.

User Avatar

Wiki User

14y ago

What else can I help you with?

Related Questions

What is the operator is used to allocate the memory in c plus plus?

calloc operator,malloc operator


What is the operator that cannot be overloaded in c plus plus and java?

conditional operator , size of operator , membership operator and scope resulation operator can not be overload in c++


Which c plus plus operators cannot be overloaded?

1. Member-of operator (.) 2. Pointer-to-member-of operator (.*) 3. Ternary condition operator (?:) 4. Scope resolution operator (::) 5. sizeof operator 6. typeid operator


What is plus operator is it unary or binary?

There is no unary plus in C, but if there were, it would have only one operand, unlike the binary plus which has two: x = a + b; /* binary plus */ x = + b; /* unary plus -- not in C*/ x = a - b; /* unary plus */ x = - b; /* unary minus */


In excel if the formula equals A1 plus B1 what is the operator?

For =A1+B1, the operator is the plus sign (+).


Which symbol replaces the AND-Boolean operator on most of the simple search facilities of search engines?

+|plus


Can the scope resolution operator be overloaded in C plus plus?

No.


Why invoking 'operator' is more efficient then invoking function?

isso is not true.


How do you swap two numbers with bitwise operator in c plus plus?

// Note: ^ is the XOR operator a = a ^ b b = b ^ a a = a ^ b


What is the operator of power in c plus plus?

There is no "power" operator in C or C++. You need to the use the math library function pow().


In Excel the plus sign is an example of an operand in a worksheet formula?

The plus sign is an operator, not an operand. An operand is something that an operator operates on. For example, A3 and 10 are the operands in the following formula and the operator is the plus sign. =A3+10


What are special operators in c plus plus?

The only "special" operators in C++ are those that cannot be overloaded. That is; the dot member operator (.), pointer to member operator (.*), ternary conditional operator (:?), scope resolution operator (::), sizeof() and typeof().