i am trying to search for a string in a structure allocated for 100 clients, just get confused on how to access variables in ptr structure for example
Code:
struct fac
{ 
int a[50];
int b[50];
int c;
struct res * r;
};

struct res 
{
int a1;
int b2;
};

int main ()
{
struct fac data[100];
data[100]= (struct fac *) malloc ( 4 * sizeof(struct fac))
}
i think i allocated memory for 100 clients, now lets say i wanted to search for a string in struct fac int a , how do you locate the whole record in the structure and print it???
any help would be appreciated for some reason i have no clue how to do this