Skip to content

Instantly share code, notes, and snippets.

@harobed
Forked from anonymous/pourquoi *pn ?
Last active July 30, 2016 08:24
Show Gist options
  • Save harobed/42d872802ed38ae7a9b7f7212901b72f to your computer and use it in GitHub Desktop.
Save harobed/42d872802ed38ae7a9b7f7212901b72f to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main ()
{
int chiffres[3];
char *pn = 0;
x = 0;
pn = chiffres;
for(x=0; x<3; x++)
{
*pn = x+1;
pn ++;
}
for (x=0; x<3; x++)
{
printf("chiffres[%d] = %d \n", x, *(chiffres+x));
}
return (0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment