Created
October 11, 2019 04:31
-
-
Save easleyschool/3bce9402523d56e144ab491a40ac5e55 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* n is the length of array a[] */ | |
int sum(int a[], int n) | |
{ | |
int x = 0; // 4 bytes for x | |
for( int i = 0; i < n; i++ ) // 4 bytes for i | |
{ | |
x = x + a[i]; | |
} | |
return(x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment