All pastes #946114 Raw Edit

dee

public c v1 · immutable
·published 2008-03-17 13:28 UTC
rendered paste body
int * ptr1;char array1[17];int main() { array1[ 0 ] = 11; array1[ 1 ] = 17; array1[ 16 ] = 53; /* last element */    ptr1 = array1; /* assign new value to pointer variable */  printf ("\nP.15: Executed ptr1 = array1; \n");    printf ("P.16: ptr1: stored at %08x (hex); value is %d (dec), %08x (hex)\n", &ptr1, ptr1, ptr1);  printf ("P.17: Dereference pointer ptr1 and we find: %d \n", *ptr1);}*************'OUTPUT*************************P.15: Executed ptr1 = array1; P.16: ptr1: stored at 08049f0c (hex); value is 134520592 (dec), 08049f10 (hex)P.17: Dereference pointer ptr1 and we find: 4363 **************************************************