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...

In JPA, when you compile the entity classes, the compiler looks at the annotations and adds JPA capabilities that help manage the interactions with the database—this is known as ________ capabilites.

a. implanting b. injecting c. infusing d. instilling

Computer Science & Information Technology

________ measure human characteristics such as fingerprints and eye retinas

A) RFID scanners B) Optical scanners C) Magnetic strip readers D) Biometric scanners

Computer Science & Information Technology

Blender is open-source and you can modify its core programming

Indicate whether the statement is true or false

Computer Science & Information Technology

Which of the following is not true about the VLOOKUP function?

What will be an ideal response?

Computer Science & Information Technology