#include <stdio.h>
struct Datario {int giorno; int mese; int anno;};
void f (struct Datario *d)
{
unsigned int indirizzo = (int) d;
d->giorno = 28;
d->mese = 2;
d->anno = 2007;
printf ("data %i-%i-%i inserita all'indirizzo %u\n", d->giorno, d->mese, d->anno, indirizzo);
}
int main (void)
{
struct Datario data = {31, 12, 2007};
unsigned int ind = (int) &data;
f (&data);
printf ("data %i-%i-%i inserita all'indirizzo %u\n", data.giorno, data.mese, data.anno, ind);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgpzdHJ1Y3QgRGF0YXJpbyB7aW50IGdpb3JubzsgaW50IG1lc2U7IGludCBhbm5vO307Cgp2b2lkIGYgKHN0cnVjdCBEYXRhcmlvICpkKQp7CiAgICB1bnNpZ25lZCBpbnQgaW5kaXJpenpvID0gKGludCkgZDsKICAgIGQtPmdpb3JubyA9IDI4OwogICAgZC0+bWVzZSA9IDI7CiAgICBkLT5hbm5vID0gMjAwNzsKICAgIHByaW50ZiAoImRhdGEgJWktJWktJWkgaW5zZXJpdGEgYWxsJ2luZGlyaXp6byAldVxuIiwKICAgICAgICAgICAgIGQtPmdpb3JubywgZC0+bWVzZSwgZC0+YW5ubywgaW5kaXJpenpvKTsKfQoKaW50IG1haW4gKHZvaWQpCnsKICAgIHN0cnVjdCBEYXRhcmlvIGRhdGEgPSB7MzEsIDEyLCAyMDA3fTsKICAgIHVuc2lnbmVkIGludCBpbmQgPSAoaW50KSAmZGF0YTsKICAgIGYgKCZkYXRhKTsKICAgIHByaW50ZiAoImRhdGEgJWktJWktJWkgaW5zZXJpdGEgYWxsJ2luZGlyaXp6byAldVxuIiwKICAgICAgICAgICAgIGRhdGEuZ2lvcm5vLCBkYXRhLm1lc2UsIGRhdGEuYW5ubywgaW5kKTsKICAgIHJldHVybiAwOwp9Cg==