19.04.2013 Views

Aula 3 – Alocação Dinâmica - CAFW - UFSM

Aula 3 – Alocação Dinâmica - CAFW - UFSM

Aula 3 – Alocação Dinâmica - CAFW - UFSM

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

int* p;<br />

int* r;<br />

int* q;<br />

p = malloc(sizeof(int));<br />

*p = 5;<br />

q = malloc(sizeof(int));<br />

q = p;<br />

r = p;<br />

printf("%d",*p);<br />

5<br />

O que acontece com o<br />

espaço alocado para q?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!