Created
January 29, 2014 20:51
-
-
Save niyaton/8696796 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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