This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

10
test/a_i.c Normal file
View File

@@ -0,0 +1,10 @@
#include <stdio.h>
int main(void){
int a[10],i;
for (i = 1; i <= 10; i++)
{
a[i]=0;
printf("%d\n",i);
}
return 0;
}

1
test/example.txt Normal file
View File

@@ -0,0 +1 @@
hello, World!hello, World1!hello, World1!

17
test/file.c Normal file
View File

@@ -0,0 +1,17 @@
#include <stdio.h>
#include <string.h>
int main(){
FILE *fp = fopen("example.txt","r+");
if(fp == NULL){
printf("error,cannot open file");
return 1;
}
char buffer[100];
fread(buffer,sizeof(char),100,fp);
printf("%s\n",buffer);
char *wt = "hello, World1!";
fwrite(wt,sizeof(char),strlen(wt),fp);
fclose(fp);
}

7
test/test1.c Normal file
View File

@@ -0,0 +1,7 @@
#include <stdio.h>
int main(){
char* a= "I love China!";
a = a+7;
printf("%s\n",a);
}

10
test/test2.c Normal file
View File

@@ -0,0 +1,10 @@
#include <stdio.h>
int main(){
int i,j;
i = 16;
j = (i++)+i;
printf("%d\n",j);
i = 15;
printf("%d %d\n",++i,i);
}

10
test/test3.c Normal file
View File

@@ -0,0 +1,10 @@
#include <stdio.h>
int main(){
int i;
char *s = "a\045+45\'b";
for(i=0;s++;i++);
printf("%d\n",i);
}
// 无限循环

6
test/test3305.c Normal file
View File

@@ -0,0 +1,6 @@
#include "../2025/03/3305.h"
#include <stdio.h>
int main(){
printf("%d\n",countOfSubstrings("ieaouqqieaouqq",1));
}