ainda ponteiros em C

int main()
{
 int a=0, b = 4;
 int *p;

 p = &a;
 printf("%d\n", *p);
 *p = b * 10; //estou a modificar o valor da variavel a
 printf("%d\n", *p);
 p = &b; //estou a modificar para onde aponta p
 printf("%d\n", *p);

 printf("%d  %d\n", *p, *p+a);

    return 0;
}

Tags : ,

0 thoughts on “ainda ponteiros em C”

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.