adplus-dvertising
frame-decoration

Question

What will be the output of the this program?
    #include <stdio.h>
    using namespace std;
    int main ()
    {
        int array[] = {0, 2, 4, 6, 7, 5, 3};
        int n, result = 0;
        for (n = 0; n < 8; n++) {
            result += array[n];
        }
        cout << result;
        return 0;
    }

a.

25

b.

26

c.

27

d.

None of the mentioned

Answer: (d).None of the mentioned

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What will be the output of the this program?