+ 3

What is ++a?

pls tell me is it simillar to a++

1st May 2018, 6:19 PM
Harsh
4 Answers
+ 3
++a is prefix increment while a++ is postfix increment. like wise --a and a--
2nd Jul 2018, 6:14 AM
Wajeeh
Wajeeh - avatar
+ 3
++a is a Pre increament and a++ is a Post increament. ++a returns the incremented value to another variable. When assign with another variable. a++ returns the original value to another variable and then variable a is incremented.
1st May 2018, 7:13 PM
UnknownYmous
+ 3
++a is prefix and a++ is postfix for e.g int a=6 b=++a (then firstly the value of 'a' is increased by 1 and then it is assigned to b. so the answer is a=7 and b=7) now a++ int a=6 int b=a++ (here firstly the value of 'a' is assigned to b i.e b=6 then the value of a is increased by 1) so the answer is a=7 b=6.
2nd May 2018, 9:28 AM
Sarthak Nikumbh
Sarthak Nikumbh - avatar