fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. int a[]={3,5,2,4,1,9,7,6,0,8}, i, b ,c , d, e, f, g,h;
  5. for(i=0;i<10;i++){
  6. printf("%d,",a[i]);
  7. }
  8. printf("\n");
  9. b=a[0]; c=a[3]; a[0]=c; a[3]=b;
  10. e=a[5]; a[3]=e; a[5]=c;
  11. f=a[8]; a[5]=f; a[8]=e;
  12. for(i=0;i<10;i++){
  13. printf("%d,",a[i]);}
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5284KB
stdin
Standard input is empty
stdout
3,5,2,4,1,9,7,6,0,8,
4,5,2,9,1,0,7,6,9,8,