Difference between revisions of "C: Ponteiro para variável"

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
(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>)
 
(No difference)

Latest revision as of 01:23, 17 April 2009

#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;
}