Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(void)
- {
- float a=3.0, b[2]={1,2}, *p1, *p2;
- printf("%p %p \n",&a,&b[0]);
- p1=&a;
- p2=&b[0];
- printf("%p %p %f %f \n",p1,p2,*p1,*p2);
- p2=p2+1; // pula pro proximo espaço da memoria
- printf("%p %p %f %f \n",p1,p2,*p1,*p2);
- p1=p2;
- printf("%p %p %f %f \n",p1,p2,*p1,*p2);
- p2=b; // b é igual a &b[0]
- *p1=*p2;
- printf("%p %p %f %f \n",p1,p2,*p1,*p2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement