Advertisement
Guest User

whytho.c

a guest
Aug 29th, 2015
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.25 KB | None | 0 0
  1.     #include <stdio.h>
  2.     #include <stdlib.h>
  3.    
  4.     int main() {
  5.       int *p = (int*)malloc(sizeof(int));
  6.       int *q = (int*)realloc(p, sizeof(int));
  7.       *p = 1;
  8.       *q = 2;
  9.       if (p == q)
  10.         printf("%d %d\n", *p, *q);
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement