Which of the answers does the same thing as the following: value += sum++;
Advertisements
प्रश्न
Which of the answers does the same thing as the following:
value += sum++;
पर्याय
value = value + sum;sum = sum + 1;sum = sum + 1;value = value + sum;value = value + sum;value = value + ++sum;
MCQ
Advertisements
उत्तर
value = value + sum; sum = sum + 1;
Explanation:
The statement value += sum++; first adds the original value of sum to value and then increments sum by 1.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
