الأجوبة
/*Write a C program to compute the sum of the elements of a given array of integers*/
#include <stdio.h>
#include <stdlib.h>
int main(void){
int array1[] = {10, 20, 30, 40, 50};
int array2[] = {10, 20, -30, -40, 50};
printf("%d",test(array1));
printf("\n%d",test(array2));
}
int test(int a1[])
{
return a1[0] + a1[1] + a1[2] + a1[3] + a1[4];
}أسئلة مشابهة
القوائم الدراسية التي ينتمي لها السؤال