1.

What will be the output of this program?
#include 
using namespace std;
int arr1[] = {150, 50, 230, 130, 160};
int arr2[] = {13, 15, 30, 28, 50};
int temp, res = 0;
int main()
{
for (temp = 0; temp < 5; temp++)
{
res += arr1[temp];
}
for (temp = 0; temp < 4; temp++)
{
res += arr2[temp];
}
cout << res;
return 0;
}

A. 806
B. 150
C. 130
D. 13
E. 15
Answer» B. 150


Discussion

No Comment Found

Related MCQs