D | casts.c | 13 int px = &x; in test2() local 15 int y = * (int*) px; in test2() 20 int px = (int) malloc(120); in test3() local 21 * (int*) px = 8; in test3() 22 * (int*) (px + 4) = 9; in test3() 23 printf("Testing writing (int*): %d %d\n", * (int*) px, * (int*) (px + 4)); in test3() 24 free((void*) px); in test3() 29 int px = &x; in test4() local 30 int a = * (char*) px; in test4() 31 int b = * (char*) (px + 1); in test4() [all …]
|