A few things first:
This is C, not C++. You posted in the C++ forum. Did you want to write C?
You are using UNIX functions, not standard C or C++ functions. It won't run on other platforms, like Windows. Do you want this?
cctype.h is not a header. It's either ctype.h if you're using C or cctype if you're using C++.