Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/codemistic/Data-Structures-and-Algorithms
/ Sum
Function
Sum
Arrays/31_Menu_for_Array.c:297–305 ·
view source on GitHub ↗
Sum Function
Source
from the content-addressed store, hash-verified
295
296
//Sum Function
297
int Sum(struct array arr)
298
{
299
int sum=0,i;
300
for(i=0;i<arr.length;i++)
301
{
302
sum+=arr.A[i];
303
}
304
return sum;
305
}
306
307
//Average Function
308
float Avg(struct array arr)
Callers
3
Avg
Method · 0.70
Avg
Function · 0.70
main
Function · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected