HackerRank C- A Very Big Sum

Complete the aVeryBigSum function in the editor below. It must return the sum of all array elements.

aVeryBigSum has the following parameter(s):

ar: an array of integers .

  1. #include<stdio.h>
  2. int main()
  3. {
  4. int n,i;
  5. long long int sum=0;
  6. scanf("%d",&n);
  7. long long int a[n];
  8. for(i=0;i<n;i++)
  9. {
  10. scanf("%lld",&a[i]);
  11. sum=sum+a[i];
  12. }
  13. printf("%lld",sum);
  14. }
Please click on the like button if it worked

Solution not working or have any suggestions? Please send an email to [email protected]

donate a cup of tea :)

Join Our Facebook Group

Share this solution


Codesadda.com is your home of programming solutions, tutorials, video tutorials and much more. Sign Up for our weekly newsletter to get update about new content.

Like us on Facebook | Connect with us on LinkedIn | Subscribe our Channel on Youtube