Rewrite the C PROGRAMMING LANGUAGE CODE in terms of onlydereferencing (*) and pointer addition (+) AND extend the code sothat allocated memory is freed properly. Thank you
struct foo {
int a;
char b;
};
int main(void)
{
struct foo* arr[5];
int x;
for(x = 0; x < 5; x++)
{
arr[x] = malloc(sizeof(struct foo));
arr[x]->a = 0;
arr[x]->b = 'b';
}
}