#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct {
int ano;
int mes;
int dia;
} Data;
typedef struct {
char nome[20];
char cpf[12];
Data data_nasc;
} Pessoa;
void func1(Pessoa *pessoa) {
strcpy(pessoa
->nome
, "Bigown"); strcpy(pessoa
->cpf
, "040502016"); pessoa->data_nasc.ano = 1990;
pessoa->data_nasc.mes = 5;
pessoa->data_nasc.dia = 15;
}
int main() {
Pessoa
*pessoa
= malloc(sizeof(Pessoa
)); func1(pessoa);
printf("Data: %d/%d/%d\nPessoa: %s\nCPF: %s ", pessoa
->data_nasc.
dia, pessoa
->data_nasc.
mes, pessoa
->data_nasc.
ano, pessoa
->nome
, pessoa
->cpf
); return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxzdGRsaWIuaD4KI2luY2x1ZGUgPHN0cmluZy5oPgoKdHlwZWRlZiBzdHJ1Y3QgewogICAgaW50IGFubzsKICAgIGludCBtZXM7CiAgICBpbnQgZGlhOwp9IERhdGE7CnR5cGVkZWYgc3RydWN0IHsKICAgIGNoYXIgbm9tZVsyMF07CiAgICBjaGFyIGNwZlsxMl07CiAgICBEYXRhIGRhdGFfbmFzYzsKfSBQZXNzb2E7CnZvaWQgZnVuYzEoUGVzc29hICpwZXNzb2EpIHsKICAgIHN0cmNweShwZXNzb2EtPm5vbWUsICJCaWdvd24iKTsKICAgIHN0cmNweShwZXNzb2EtPmNwZiwgIjA0MDUwMjAxNiIpOwogICAgcGVzc29hLT5kYXRhX25hc2MuYW5vID0gMTk5MDsKICAgIHBlc3NvYS0+ZGF0YV9uYXNjLm1lcyA9IDU7CiAgICBwZXNzb2EtPmRhdGFfbmFzYy5kaWEgPSAxNTsKfQppbnQgbWFpbigpIHsKCVBlc3NvYSAqcGVzc29hID0gbWFsbG9jKHNpemVvZihQZXNzb2EpKTsKICAgIGZ1bmMxKHBlc3NvYSk7CiAgICBwcmludGYoIkRhdGE6ICVkLyVkLyVkXG5QZXNzb2E6ICVzXG5DUEY6ICVzICIsIHBlc3NvYS0+ZGF0YV9uYXNjLmRpYSwgcGVzc29hLT5kYXRhX25hc2MubWVzLCBwZXNzb2EtPmRhdGFfbmFzYy5hbm8sIHBlc3NvYS0+bm9tZSwgcGVzc29hLT5jcGYpOwogICAgcmV0dXJuIDA7Cn0=