What is the output of this code?
    #include <stdio.h>
    #include<iostream>
    using namespace std;
    int array1[] = {289, 432, 983, 498, 2003};
    int array2[] = {2, 4, 1, 8, 3};
    int temp, result = 0;
    int main()
    {
        for (temp = 0; temp < 5; temp++) 
        {
            result += array1[temp];
        }
        for (temp = 0; temp < 4; temp++)
        {
            result += array2[temp];
        }
        cout << result;
        return 0;
    }

Posted on by