just for fun I wrote this implementation of isalpha and it works but I have a lot of warnings, can you tell me how to fix them, or how can I do it in better way?
Warnings:
Line 6: comparision between pointer and integer
Line 23: passing argument 1 of 'pointer' makes pointer from integer without a cast
#include <stdlib.h>
#include <stdio.h>
int my_isalpha(char *mark)
{
if((((mark)>=0x41)&&((mark)<=0x5A)||((mark)>=0x61)&&((mark)<=0x7A))) //WARNING
return 1;
else
return 0;
}
int main()
{
char mark;
int (*pointer)(char*);
pointer=my_isalpha;
printf("Your mark: ");
scanf("%c",&mark);
if(pointer(mark)) //WARNING
printf("TRUE");
else
printf("FALSE");
return 0;
}