MCPcopy Create free account
hub / github.com/chaharnishant11/CodeIn10DSA / sumArray

Function sumArray

C++/Homework/sumOfArrayElements.cpp:4–10  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2using namespace std;
3
4long long int sumArray(int arr[], int n){
5 long long int sm=0;
6 for(int i=0;i<n;i++){
7 sm+=arr[i];
8 }
9 return sm;
10}
11
12int main(){
13 int arr[10] = {6,2,6,0,1,3,8,9,7,3};

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected