Challenge:39.5 My Solution

int spaceCount(const char *c){
int sum = 0;
for (int i = 0; i < strlen©; i++) {
if (c[i] == 0x20) {

        sum++;
    }
}
return sum;

}

int main(int argc, const char * argv[]) {

const char *sentence = "He was not in the cab at the time.";
printf("\"%s\" has %d spaces\n",sentence,spaceCount(sentence));


return 0;

}