Skip to content

Instantly share code, notes, and snippets.

@niyaton
Created January 29, 2014 20:51
Show Gist options
  • Save niyaton/8696796 to your computer and use it in GitHub Desktop.
Save niyaton/8696796 to your computer and use it in GitHub Desktop.
int a[10]; //配列には適切な値が入っていると仮定する
int tmp; // 一時的に利用する変数.(temporaryの略でtmp)
// a[0]とa[3]を交換する.
tmp = a[0]
a[0] = a[3]; //a[0] = tmpでもよい
a[3] = tmp;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment