Using System functions
One of the wonders of C is in the fact that program code can be simplified by using a function which makes the job easier.
ctype.h
Some programs use special functions that some C Compilers define in a special header file called "header.h". Many compilers including UNIX put the definition for character testing functions inside ctype.h If you use these compilers and you reference these functions inside your program , you must put a #include instruction in your code. Other compilers like microcomputer C compiler have no ctype.h file and put the definitions for these functions in the system library that is referenced at link time. However, some compilers do not support these functions at all.
#include
#include
main( )
{ /* main */
int Response;
char Changed;
printf("Do you like programming? ( Y or N ): ");
Response = getchar( );
Changed = tolower(Response);
if (Changed == 'y')
printf("Just wait until you can see what you can do!");
else { printf(" :-( Programming is not your cup of tea!"); }
} / * main */