+ 1

[SOLVED] Shorthand Forms

In how many forms we can write this (sum += arr[x];).

7th Feb 2020, 3:23 PM
Muhammad Nazam
2 odpowiedzi
+ 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.
7th Feb 2020, 3:41 PM
🇮🇳Omkar🕉
🇮🇳Omkar🕉 - avatar
+ 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]
7th Feb 2020, 3:51 PM
Denise Roßberg
Denise Roßberg - avatar