[ create a new paste ] login | about

Link: http://codepad.org/1rf9jwig    [ raw code | output | fork ]

C, pasted on Aug 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include<stdio.h>
void main ()
{
        const int i=10;
        int *j;
        j = &i;

        printf("address of i is %p\n",&i);
        printf("j is %d\n",*j);

        (*j)++;

        printf("j is %d\n",*j);
        printf("address of j is %p\n",j);
        printf("i is %d\n",i);
}


Output:
1
2
3
4
5
address of i is 0xbf825ae8
j is 10
j is 11
address of j is 0xbf825ae8
i is 10


Create a new paste based on this one


Comments: