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

typedef struct{
char *name;
char *address;
}ADDR;

int main(void){
char buf[512];
ADDR *temp;

if((temp = malloc(sizeof(ADDR))) == NULL)return EXIT_FAILURE;

printf("名前:");
fgets(buf, sizeof(buf), stdin);
if((temp->name = malloc(strlen(buf) +1)) == NULL)return EXIT_FAILURE;
strcpy(temp->name, buf);

printf("住所:");
fgets(buf, sizeof(buf), stdin);
if((temp->address = malloc(strlen(buf) +1)) == NULL)return EXIT_FAILURE;
strcpy(temp->address, buf);

printf("\n名前:%s住所:%s",
temp->name, temp->address
);

return EXIT_SUCCESS;
}