strcnmp函数的使用23

database

#include<stdio.h>
#include<string.h>

main()

{
    char *list[]={"qwertytyy","qwexfgdgrgg","12344ryryyry","asdddff"};

    int x,y;

    y=(list);

    printf("y:%d

",y);

    for(x=0;x<y;x++)
    {
       if(strncmp(list[x],"qwe",3)==0)
       {
        printf("list[%d]:%s

",x,list[x]);
       }

    }
}

[root@VM_0_2_centos 20210414]# ./2
list[0]:qwertytyy
list[1]:qwexfgdgrgg
[root@VM_0_2_centos 20210414]#

以上是 strcnmp函数的使用23 的全部内容, 来源链接: utcz.com/z/535434.html

回到顶部