if $a= 3 then what's the ++$a and $a++? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

if $a= 3 then what's the ++$a and $a++?

14th Oct 2015, 4:42 PM
Mahendra Singh
Mahendra Singh - avatar
2 Answers
+ 1
both will have the same answer 4 in this case
1st Jul 2016, 9:30 AM
Midhun Mathew
0
$a++ means $a=$a+1, but it is a post-increment. so even if it plus 1, it will still return to the original value. that is, if $a=3, $a++=3 and ++$a=4 by the way
3rd Nov 2015, 6:40 AM
intecharlie