rastkocvetkovic
Programmer
What's wrong with my function. It hangs upon usage. Thank you for help!
float calculateSumOfArray(float *table) {
int index;
index = 0;
float sum;
sum = 0;
while ((table+index) != NULL) {
sum = sum + *(table+index);
index++;
}
return sum;
}
float calculateSumOfArray(float *table) {
int index;
index = 0;
float sum;
sum = 0;
while ((table+index) != NULL) {
sum = sum + *(table+index);
index++;
}
return sum;
}