Rewrite the code below using the for each loop construct provided in C++11.
```
int b[5] = {3,4,5,6,7};
int sum = 0;
for (int j = 0; j < 5; j++)
sum+=b[j];
```
```
int b[5] = {3,4,5,6,7};
int sum = 0;
for (int val : b)
sum+=val;
```
Computer Science & Information Technology
You might also like to view...
Twitter is a full-featured social network
Indicate whether the statement is true or false
Computer Science & Information Technology
A(n) ________ is a value used for calculation or comparison purposes that is stored in a single location and can be used many times but be edited in that single location
Fill in the blank(s) with correct word
Computer Science & Information Technology