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];
```What will be an ideal response?
```
int b[5] = {3,4,5,6,7};
int sum = 0;
for (int val : b)
sum+=val;
```
You might also like to view...
What is the content of the Xfile after the following command is executed? date > Xfile
a: nothing b: the word date c: list of the filenames in the current directory d: current date and time e: an error message
A(n) ________ is a punctuation symbol used to indicate an explanation or emphasis
Fill in the blank(s) with correct word
The COUNTA function will count the number of cells in a range that meet a specified condition
Indicate whether the statement is true or false.
The Separations Preview panel comes into play during the design stages of the project.
Answer the following statement true (T) or false (F)