C言語なら俺に聞け(入門編)Part 61
■ このスレッドは過去ログ倉庫に格納されています
0062デフォルトの名無しさん
2010/03/07(日) 11:43:04このホワイトボードプログラミングのところ:
http://japan.zdnet.com/sp/feature/07tenthings/story/0,3800082984,20409456-2,00.htm
一応、こんな感じで(^^
int *
reverse(int ary[])
{
int i = 0;
int j = SIZE - 1;
int tmp;
loop:
if (i >= j) goto end;
tmp = ary[i];
ary[i++] = ary[j];
ary[j--] = tmp;
goto loop;
end:
return ary;
}
■ このスレッドは過去ログ倉庫に格納されています