I have posted questions in the past but my code has evolved and i need some more assistance.. any help is appreciated..
what i need to do is check to see if tid[i] is a character and if tname[i] is a digit. if they are i need to print an error and not store them in array. here is my code please help

#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <ctype.h>



#define MAXACCTS 16
#define BUF 64
#define NAME_SZ 10



int main()
{


FILE *fp;
FILE *out;
char tname[MAXACCTS][NAME_SZ];
int tid[MAXACCTS], i=0, size =0, k=0;
float tamount[MAXACCTS];
char buffer[BUF];


//open pointers to files transact.txt and accounts.txt

if(( fp = fopen("transact.txt", "r")) == NULL)
{
perror("UNABLE TO OPEN transact.txt\n");
return -1;
}

if((out = fopen("accounts.txt", "w")) == NULL)
{
printf("UNABLE TO OPEN accounts.txt\n");
system("pause");
return -2;
}

for(size =0; size < MAXACCTS; ++size)
{
//read transact.txt and store in buffer
while(fgets(buffer, BUF, fp) != NULL)
{
str

// read string from file and store information in separate arrays
if(sscanf(buffer,"%d %s %f", &tid[i], tname[i], &tamount[i]) ==3)
{

//verify id is valid
if(tid[i] > 999 && tid[i] < 10000 )
{
//check name for less than ten characters
if(strlen(tname[i]) <NAME_SZ)
{
//write valid accounts to Accounts.txt
fprintf(out, "%5d\t%10s\t%10.2f\n", tid[i], tname[i], tamount[i]);
}
else
printf("\nERROR: \t Account Name: \"%s\" is over %d characters\n\n", tname[i], NAME_SZ -1);
}
else
printf("\nERROR: \t invalid ID %d\t%s\t\t%.2lf\n", tid[i], tname[i], tamount[i]);
}
else
printf("Invalid transaction");


}
}
printf("the value of size is %d\n", size);

fclose(fp);
fclose(out);
return 0;


}