I'm completely new to C, and I am attempting to run this example code on xcode, but it says build failed. I got the code exact like it is in the book, but it still won't run.
#include <stdio.h>
/* count characters in input; 2nd version */
int main()
{
double nc;
for (nc =0; getchar() != EOF; ++nc) {
;
}
printf("%.0f\n", nc);
}
Sorry if it's a noob question. All help is appreciated!