main.c
#include<stdio.h>
#include<stdlib.h>
int sum(int N,int arr[]);
int main(int argc,char **argv)
{
int result;
int b[argc];
printf("%d\n",argc-1);
for (int i=0;i<argc;i++)
{
b[i]=atoi(argv[i]);
result=sum(argc,ch);
}
printf("the result is %d\n",result);
return 0;
}
sum.c
int sum(int N,int arr[]){
int s=0;
for(int i=0;i<N;i++)
s+=arr[i];
return s;
}