int main() { name[100] last one = length - 1 i.e 100 - 1 = 99
name[99] gives last value 0-9 48 - 57 ( number ) char a[10];
printf("enter");
scanf("%s",a);
int as = a[9];
if (as >= 48 && as <=57){
printf("number");
} else{
printf("not");
}
return 0;
}
No comments:
Post a Comment