fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a,b,*p,*q;
  5. p = &a;
  6. q = &b;
  7. *q = 1;
  8. a = 3;
  9. b = *p;
  10. *q = 1;
  11.  
  12. printf("a=%d,b=%d,*p=%d,*q=%d\n",a,b,*p,*q);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5276KB
stdin
Standard input is empty
stdout
a=3,b=1,*p=3,*q=1