clrarray.c

来自「大方科技莱卡的减肥了但十分大方的发生地方」· C语言 代码 · 共 16 行

C
16
字号
/*
** Set all of the elements of an array to zero.
*/

void
clear_array( int array[], int n_elements )
{
	/*
	** Clear the elements of the array starting with the last
	** and working towards the first.  Note the predecrement
	** avoids going off the end of the array.
	*/
	while( n_elements > 0 )
		array[ --n_elements ] = 0;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?