implicit return 0 for main

This commit is contained in:
Yaossg 2024-11-30 09:40:52 +08:00
parent 4893f0cd68
commit 50969c6bb9
7 changed files with 36 additions and 27 deletions

View file

@ -2,5 +2,4 @@ int printf(const char* format, ...);
int main() {
printf("hello world %d\n", 42);
return 0;
}

View file

@ -43,5 +43,4 @@ int main() {
char ch;
while ((ch = getchar()) == '"') parse_string();
dump_string_table();
return 0;
}

View file

@ -43,5 +43,4 @@ void queen(int x) {
int main() {
queen(1);
printf("solutions: %d\n", a[0]);
return 0;
}

View file

@ -27,5 +27,4 @@ int main() {
printf("%d ", a[i]);
}
printf("\n");
return 0;
}

View file

@ -13,5 +13,4 @@ int main() {
const char* s2 = "world";
printf("%d\n", strcmp(s1, s2));
printf("%d\n", strcmp(s1 + 5, s2));
return 0;
}