Difference between revisions of "C: Ponteiro para ponteiro"

From AdonaiMedrado.Pro.Br
Jump to: navigation, search
(New page: <code lang="c"> #include <stdio.h> int main(void) { int **pp, *p, a; p=&a; pp=&p; scanf("%d",&a); printf("%d (*p) = %d (**pp) = %d (a)\n",*p,**pp,a); printf("%p (*pp) = %p (p) = %p ...)
 
(No difference)

Latest revision as of 13:17, 17 April 2009

#include <stdio.h>
 
int main(void)
{
	int **pp, *p, a;
	p=&a;
	pp=&p;
	scanf("%d",&a);
	printf("%d (*p) = %d (**pp) = %d (a)\n",*p,**pp,a);
	printf("%p (*pp) = %p (p) = %p (&a)\n",*pp,p,&a);
	printf("%p (pp) = %p (&p)\n",pp,&p);
	printf("%p (&pp)\n",&pp);
	return 0;
}