answersLogoWhite

0


Best Answer

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

10y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

There is no such operator as +++ in C. However, you may encounter the following:

int x=1;

int y=x+++1;

This is perfectly valid code, after which both x and y will be 2. However, it's not exactly clear why.

If we re-write the expression to show the correct operator precedence we can see what's really going on.

int x=1;

int y=(x++)+1;

So x++ (post increment operator) increments x making it 2, but returns 1, so y is assigned 1+1, therefore both x and y become 2.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the meaning for you plus plus plus in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What do the two plus stand for in C plus plus?

The ++ in C++ refers to the postfix increment operator (operator++()). It's literal meaning is "the successor to C", in reference to the C language upon which the C++ language is based.


How does the use of the 'void' keyword differ in C plus plus vs. C?

It doesn't. Void has the same meaning in both.


Main meaning of turbo c plus plus?

Name of a compiler (and IDE) from Borland.


What is the meaning of plus plus in c?

++a (plus plus a) is pre-incrementing operator to aa=10;printf("%d",++a); /* it will print 11 as ++a increment first a by 1 then prints it */printf("%d",a++); /*it will printf 10 as it is post _ increment operator , it prints the value a first then increment it by 1 */


How do you prove if a is less than b then a plus c is less than b plus c?

I believe that's usually treated as an axiom, meaning you don't prove it.


What is b plus b plus b plus c plus c plus c plus c?

b+b+b+c+c+c+c =3b+4c


What is c plus c plus 2c plus c plus c equal?

c + c + 2c + c + c = 6c


B plus b plus b plus c plus c plus c plus c equals?

b + b + b + c + c + c + c = 3b + 4c


Symplify c plus c plus c plus c?

4c


What is c plus c plus c plus c plus c?

c + c + c + c + c = 5 * c.


Primary and secondary key in c and c plus plus?

There are no "primary and secondary keys" in c and c plus plus.


What is the meaning of star d in c plus plus programming?

If d is a pointer variable, then *d is the value stored in the memory address pointed to by d.