fork download
  1. #include <stdio.h>
  2.  
  3. void Swap(int **dp1, int **dp2)
  4. {
  5. int *temp = *dp1;
  6. *dp1 = *dp2;
  7. *dp2 = temp;
  8. }
  9.  
  10. int main(void)
  11. {
  12. int a = 10;
  13. int b = 20;
  14. int *c = &a;
  15. int *d = &b;
  16.  
  17. printf("첫 결과: a: %d b: %d\n", a, b);
  18.  
  19.  
  20. pointer2(&c,%d);
  21. printf("최종결과 after a: %d b: %d\n", a ,b);
  22. return 0;
  23. }
  24.  
Compilation error #stdin compilation error #stdout 0s 10320KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:20:2: warning: implicit declaration of function ‘pointer2’ [-Wimplicit-function-declaration]
  pointer2(&c,%d);
  ^~~~~~~~
prog.c:20:14: error: expected expression before ‘%’ token
  pointer2(&c,%d);
              ^
prog.c:15:7: warning: unused variable ‘d’ [-Wunused-variable]
  int *d = &b;
       ^
stdout
Standard output is empty