Exemple d’utilisation d’adresse Arithmétique d’un pointeur

Author:

 pointeur, adresse
Download

#include 

int main()
{
    char tab[] = "123456789";

    int index;  

    for (index = 0; index < sizeof(tab)/sizeof(tab[0]); ++index) {
        printf("&tab[index]=0x%p (tab+index)=0x%p tab[index]=0x%xn",
            &tab[index], (tab+index), tab[index]);
    }
    return (0);
}

Leave a Reply

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