[SOLVED] Shorthand Forms | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 1

[SOLVED] Shorthand Forms

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

7th Feb 2020, 3:23 PM
Muhammad Nazam
2 Respostas
+ 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