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