Write a function called spaceCount() that counts the space characters (ASCII 0x20) in a C string. Test it like this:
#include <stdio.h> int main (int argc, const char * argv[]) { const char *sentence = "He was not in the cab at the time."; printf(""%s" has %d spaces", sentence, spaceCount(sentence)); return 0; }
Remember: when you run into ' ', you have reached the end of the string!