> typedef struct competitor {
> char name;
If you want a string (as you do), then you need a char array
char name[50];

> record = (data *)malloc(n * sizeof(data));
Don't cast malloc in C.
If you remove the cast and you're still getting errors, then you're probably compiling C++.

> for(count = 0; count <= (n-1); count++)
The common idiom for accessing all the elements of an array is
for(count = 0; count < n; count++)

> when work with pointers to structures use every operator "->" that means pointer for one field of struct.
Actually, the OP had it right, and you've got it wrong.
&foo->bar
is identical to
&foo[0].bar