尽心致胜的博客昨天用C编程,遇到一个关于scanf的细节问题,假如运行如下程序:#includeint main(){char ch1,ch2;printf("Input for ch1:/n");scanf("%c",&ch1);printf("ch1=%c/n",ch1);printf("Input for ch2:/n");scanf("%c...
weixin_40003233的博客昨天用C编程,遇到一个关于scanf的细节问题,假如运行如下程序:#includeint main(){char ch1,ch2;printf("Input for ch1:/n");scanf("%c",&ch1);printf("ch1=%c/n",ch1);printf("Input for ch2:/n");scanf("%c...
南风寺山的博客下面是用 C 语言实现求两个字符串的最长公共子串的代码: #include<stdio.h> #include<string.h> #define MAX_LEN 100 int main(){ char str1[MAX_LEN], str2[MAX_LEN]; int i, j, k, len1, len2, ...