This is my code please help int sumarray (int *array[]); int main(int argc, char
ID: 3641444 • Letter: T
Question
This is my code please help
int sumarray (int *array[]);
int main(int argc, char *argv[])
{
int x;
x = GetInteger();
int array [x];
int sol;
for( int i=0; i < x; ++i){
for( int j=5; i < 100; ++j)
*array [i] = j;
printf("(%d)-> [%d]", i, array [i]);
sol = sumarray (&array[i]);
printf("(%d)", sol);
}
return 0;
}
int sumarray (int *array[])
{
int sum =0 ;
int x;
x = GetInteger();
for( int i=0; i < x; ++i)
sum = sum + *array[i];
return sum;
}
Explanation / Answer
#include int sumarray (int array[],int size); int main(int argc, char *argv[]) { const int x=5; //x = GetInteger(); int array [x]; int sol; for( int i=0; iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.