Right use of increment in pointers


#include <stdio.h>
int main (void)
{
    int *i,j;
    i=&j;
    j=10;
    printf("%p\n",i);
    (*i)++;
    printf("%d\n%p\n",j,i);
    return 0;
}



The output is given below:

2293616
11
2293616

0 comments:

Post a Comment