Changing cctype to ctype.h and making sure I'm in C99 mode (for gcc on the mac) gives me this:
Code:
temp.c: In function ‘main’:
temp.c:43: error: case label in scope of identifier with variably modified type not containing enclosing switch statement
temp.c:70: error: case label in scope of identifier with variably modified type not containing enclosing switch statement
temp.c:84: error: case label in scope of identifier with variably modified type not containing enclosing switch statement
temp.c:93: error: case label in scope of identifier with variably modified type not containing enclosing switch statement
temp.c:97: error: ‘default’ label in scope of identifier with variably modified type not containing enclosing switch statement
temp.c:44: warning: will never be executed
temp.c:45: warning: will never be executed
temp.c:48: warning: will never be executed
temp.c:50: warning: will never be executed
temp.c:54: warning: will never be executed
temp.c:58: warning: will never be executed
temp.c:61: warning: will never be executed
temp.c:64: warning: will never be executed
temp.c:65: warning: will never be executed
temp.c:64: warning: will never be executed
temp.c:66: warning: will never be executed
temp.c:68: warning: will never be executed
temp.c:67: warning: will never be executed
temp.c:72: warning: will never be executed
temp.c:73: warning: will never be executed
temp.c:76: warning: will never be executed
temp.c:87: warning: will never be executed
temp.c:94: warning: will never be executed
temp.c:98: warning: will never be executed
temp.c:106: warning: will never be executed
temp.c: In function ‘display’:
temp.c:115: warning: unused variable ‘i’
The compiler doesn't like it when you declare variables inside a case statement. Putting those in blocks so that the other cases can't see them only leaves the warning about line 106 (a printf statement after an exit, which won't ever happen).