国产chinesehdxxxx野外,国产av无码专区亚洲av琪琪,播放男人添女人下边视频,成人国产精品一区二区免费看,chinese丰满人妻videos

memcmp

2018-11-11 15:55 更新

 原型:extern int memcmp(void *buf1, void *buf2, unsigned int count);
       
 用法:#include <string.h>
 
 功能:比較內(nèi)存區(qū)域buf1和buf2的前count個(gè)字節(jié)。
 
 說(shuō)明:
       當(dāng)buf1<buf2時(shí),返回值<0
       當(dāng)buf1=buf2時(shí),返回值=0
       當(dāng)buf1>buf2時(shí),返回值>0
 
 舉例:


     // memcmp.c
     
     #include <syslib.h>
     #include <string.h>
     main()
     {
       char *s1="Hello, Programmers!";
       char *s2="Hello, programmers!";
       int r;
       
       clrscr();
       
       r=memcmp(s1,s2,strlen(s1));
       if(!r)
         printf("s1 and s2 are identical");
       else
       if(r<0)
         printf("s1 less than s2");
       else
         printf("s1 greater than s2");
       
       getchar();
       return 0;
     }


以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)