Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.28 KB | None | 0 0
  1. struct abc {
  2.    int *B;
  3. }
  4.  
  5. int main() {
  6. int D = 3;
  7. int *C;
  8. struct abc* A = (struct abc*)malloc(sizeof(struct abc));
  9. A-> = (int*)malloc(sizeof(int));
  10.  
  11. *(A->B) = 67;
  12. C = &(A->B);
  13.  
  14. *C = &D;
  15. /* I know i could do A->B = &D, but... */
  16.  
  17. A->B == 3 ??? Will it be?
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement