You are viewing a single comment's thread. Return to all comments →
You can take look at my code as it is working according to given conditions!!
int main() {
/* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n; scanf("%d",&n); int* arr = (int*)malloc(n*sizeof(int)); int sum=0; for(int i=0;i<n;i++){ scanf("%d",(arr+i)); sum=sum+*(arr+i); } printf("%d",sum); return 0;
}
Seems like cookies are disabled on this browser, please enable them to open this website
1D Arrays in C
You are viewing a single comment's thread. Return to all comments →
You can take look at my code as it is working according to given conditions!!
include
include
include
include
int main() {
}