typedef struct {
char *word;
} STR;
int main()
{
STR *arr=(STR*)malloc(5*sizeof(*arr));
STR[2].word=(char*)malloc(200*sizeof(char));
STR[2].word=(char*)
This seems redundant. But, if you are trying to create an array of strings using your structure, where the third element is malloc'd as a 199 character string and then realloced as a 399 character string, you would do it like so:
STR *arr = (STR*)malloc(5*sizeof(STR));
arr[2].word = (char*)malloc(200*sizeof(char));
arr[2].word = (char*)realloc(arr[2].word,400*sizeof(char));