fork download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main(){
  5. int i,*ptr;
  6. i=10;
  7. ptr= &i;
  8. struct node{
  9. int data;
  10. int data2;
  11. char c;
  12. struct node* link;
  13. };
  14.  
  15. struct node*p;
  16. p = (struct node*)malloc(sizeof(struct node));
  17. printf("%d",sizeof(p));
  18.  
  19.  
  20.  
  21. printf(" %d\n",sizeof(i));
  22. printf("%d\n",sizeof(ptr));
  23. return 0;
  24. }
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
8 4
8