C: Ponteiro para variável

From AdonaiMedrado.Pro.Br
Revision as of 01:23, 17 April 2009 by Adonaimedrado (Talk | contribs) (New page: <code lang="c"> #include <stdio.h> int main(void) { int i, *p; scanf("%d",&i); p=&i; *p*=2; printf("%d\n",i); printf("%p (&i)==%p (p)\n",&i,p); return 0; } </code>)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
#include <stdio.h>
 
int main(void)
{
	int i, *p;
	scanf("%d",&i);
	p=&i;
	*p*=2;
	printf("%d\n",i);
	printf("%p (&i)==%p (p)\n",&i,p);
	return 0;
}