/* primer15.c - funkcija isalpha * u kao * makro-definicija preko bitova; * Prototip: int isalpha( int c ); * Povratna vrednost: != 0 ako je tacno, inace 0 **************************************************************/ #include int isalpha (int c ); main() { char c; int k; while( (c = getchar()) != EOF ) { k = isalpha( c ); printf("%c k = %d\n", c, k ); } } int isalpha( int c ) { int k; k = 0; if( ((65 <= c) && ( c <= 90 )) || (97 <= c) && ( c <= 122 )) k = 1; return k; }