fork download
  1. #include <iostream>
  2. #include<cstdio>
  3. using namespace std;
  4.  
  5. int main() {
  6. // your code goes here
  7. int a[3]={1,2,3};
  8. int *b,*c,*d;
  9. b=&a[0];
  10. c=&a[1];
  11. d=&a[2];
  12. int *z = b;
  13. b =c;
  14. c=d;
  15. d=z;
  16. printf("%d,%d,%d",a[0],a[1],a[2]);
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
1,2,3