more tests

This commit is contained in:
Yaossg 2025-03-09 22:28:36 +08:00
parent d0f8b3e0ad
commit 1bcff515b7
22 changed files with 191 additions and 58 deletions

16
test/io/extern.c Normal file
View file

@ -0,0 +1,16 @@
int fprintf(void* stream, char* format, ...);
int fscanf(void* stream, char* format, ...);
int sprintf(char* str, char* format, ...);
extern void* stdin;
extern void* stdout;
int main() {
char buffer[4096];
int a;
int b;
fscanf(stdin, "%d %d", &a, &b);
sprintf(buffer, "The sum of %d and %d is %d\n", a, b, a + b);
fprintf(stdout, buffer);
return 0;
}