diff --git a/万维调考试题源码/error/10-2.c b/万维调考试题源码/error/10-2.c new file mode 100644 index 0000000..0940bfb --- /dev/null +++ b/万维调考试题源码/error/10-2.c @@ -0,0 +1,53 @@ +/*---------------------------------------------------------------------- +ơ +------------------------------------------------------------------------ +дһ C Գ [ֺСдĸ]Ƕ׵ +£[nx]n Ϊx ΪСдĸʾ x ظ n Σ[nxy] +n Ϊxy ΪСдĸʾ xy ظ n Ρʵ fun +ַ벢ԭʼַ +ʾ1 +Ϲַ[5wh] +ԭʼַwhwhwhwhwh +------------------------------------------------------------------------ +ע⣺Դ¡Ķ `main` иݣ + +Program-End ֮䡣 +Ҫɾ־򲻵÷֡ +Ҫ޸ĻɾProgram-End ֮ݷ򲻵÷֡ +----------------------------------------------------------------------*/ +#include +#include +#include +char *fun(char input[]) +{ + int len = strlen(input); + char *output = (char *)malloc(1000 * sizeof(char)); + if (output == NULL) + { + printf("ڴʧܣ\n"); + return NULL; + } + int outputIndex = 0; + /**********Program**********/ + int i; + for(i=0;i +#include +// жַ +int isSubstring(char *str1, char *str2); +int main() +{ + char str1[100], str2[100]; + printf("һַ:"); + gets(str1); + printf("ڶַ:"); + gets(str2); + if (isSubstring(str1, str2)) + { + printf("ַ'%s'ַ'%s'ַ\n", str2, str1); + } + else + { + printf("ַ'%s'ַ'%s'ַ\n", str2, str1); + } + return 0; +} +int isSubstring(char *str1, char *str2) +{ + int len1 = strlen(str1); + int len2 = strlen(str2); + int i, j; + /**********Program**********/ + for(i=0;i +#include +int main() +{ + int money = 100; + int year = 1; + /**********Program**********/ + + /********** End **********/ + printf("%d ˻ϵǮᱻ", year); + printf("\n"); + return 0; +} \ No newline at end of file diff --git a/万维调考试题源码/error/4-2.c b/万维调考试题源码/error/4-2.c new file mode 100644 index 0000000..3485462 --- /dev/null +++ b/万维调考试题源码/error/4-2.c @@ -0,0 +1,36 @@ +/*--------------------------------------------------------------------- + +--------------------------------------------------------------------- +ָͨ봫ʵֽһеݰ෴˳š +磺20 24 4 13 11 +11 13 4 24 20 +--------------------------------------------------------------------- +ע⣺Դ¡Ķmain иݣ + +Program-End ֮䡣 +Ҫɾ־򲻵÷֡ +Ҫ޸ĻɾProgram-End ֮ݷ򲻵÷֡ +---------------------------------------------------------------------*/ +#include +void sort(int *, int); +void main() +{ + int a[5], i; + for (i = 0; i < 5; i++) + { + scanf("%d,", &a[i]); + } + sort(a, 5); + for (i = 0; i < 5; i++) + { + printf("%d ", a[i]); + } + printf("\n"); +} +void sort(int *p, int n) +{ + int i, j, temp; + /**********Program**********/ + + /********** End **********/ +} \ No newline at end of file