+ 1

# Addition of array

what does sum+= mean?

3 Answers

+ 26

For example, sum=5 and x=10.
sum += x means
sum = sum + x
sum = 5 + 10
sum = 15

+ 20

Yes, sum is the variable name here.

+ 1

so here the sum word is just the name right? sum=sum+x. here the first word sum is just the name?