how can i make the condition if(isalpha(str))
always said that it is invalid conversion from char to int whenever i use if(isalpha(i))
does not print the "That is alpha" help me pls?
#include <stdio.h>
#include <stdlib.h>
#include<ctype.h>
#include<string.h>
int main ()
{
int i;
char str[256];
printf ("Enter a number: ");
gets ( str );
i = atoi ( str );
if(isalpha(str))
{
printf("That is Alpha");
}
else
printf("That is digit");
printf ("Value of letter i is %d",i);
system("pause");
}