+ 1
[SOLVED] Shorthand Forms
In how many forms we can write this (sum += arr[x];).
2 Antworten
+ 3
sum += arr[x];
sum = sum + arr[x];
sum += *(arr+x);
sum = sum + *(arr+x);
sum += x[arr];
sum = sum + x[arr];
and probably there are some other ways to do this.
+ 1
Hello Muhammad Nazam
I have a bit problems to understand your question. Can you explain it a little bit more?
I only know that you can write your expression also in this form:
sum = sum + arr[x]