close
Example Source Code:strcmp(參數1,參數2),字串參數1與字串參數2 比較。
#include "stdafx.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *argv[]) { char s[]="abc"; char s2[]="abc"; if(strcmp(s,s2) == 0 ) { printf("true\n"); } else { printf("false\n"); } return 0; }
文章標籤
全站熱搜