Respuesta :
Answer:
# include <conio.h>
# include <iostream.h>
using namespace std;
main{
int a[25], sum;
cout<<"enter the values in array a";
for (int i=0; i<= 24 ; i++)
{
cin>>a[i];
}
sum =0;
for (int j=0; j<=24 ; j++)
{
sum= sum + a[j];
}
cout<< sum;
getch ();
}
Answer:
False is the correct answer to the following question.
Explanation:
In the following question there some information is missing code is missing which is 'sum = 0;
for (int i = 0; i < 25; i++)
sum = sum + list;
(T/F)'
The following code is incorrect because this is not the right way to add the elements of an array, the correct code is:
int sum=0;
for(int i = 0; i < 25; i++)
{
sum = sum + list[i];
}
In the following code block, we add each elements of an array and the addition is save into the variable "sum"
So, that's why the following code is incorrect.