⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 find_int.c

📁 c和指针的配书源码
💻 C
字号:
/*
** Find the place in an array where a particular integer value
** is stored, and return a pointer to that location.
*/
#include <stdio.h>

int *
find_int( int key, int array[], int array_len )
{
	int	i;

	/*
	** For each location in the array ...
	*/
	for( i = 0; i < array_len; i += 1 )
		/*
		** Check the location for the desired value.
		*/
		if( array[ i ] == key )
			return &array[ i ];

	return NULL;
}

⌨️ 快捷键说明

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