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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
