#include<stdio.h>
int main()
{
int arr[]={1,2,3,4,5,6,7,8,9,10};
int i=1;
int se=sizeof(arr)/sizeof(arr[0]);
int k=7;
for(i=0;i<se;i++)
{
if(arr[i]==k)
{
printf("找到了,下标为%d",i);
break;
}
}
if(i==se)
printf("没找到");
return 0;
}
标签:10,arr,数组,一个,int,有序,printf,sizeof,se From: https://blog.51cto.com/u_15862769/5834920