All pastes #173843 Raw Edit

Stuff

public text v1 · immutable
·published 2006-09-17 08:44 UTC
rendered paste body
#include <stdio.h>

int main (void)
{
        int i = 100;
        int j = 200;
        int * ip = &i;   /* address of i */
        printf ("i = %i\n", i);
        printf ("j = %i\n", j);
        printf ("ip points to i. value ip points to = %i\n", *ip);
        ip = &j;
        printf ("ip points to j. value ip points to = %i\n", *ip);
        printf ("setting value that ip points to, to 10.\n");
        *ip = 10;
        printf ("value ip points to = %i\n", *ip);
        printf ("value j was changed to = %i\n", j);
        printf ("This concludes the pointer excercise.\n");
        return 0;
}