This commit is contained in:
Masashi 2025-12-16 18:58:52 +05:30
commit 77ca7b179c
3 changed files with 29 additions and 11 deletions

18
tests/functions.c Normal file
View file

@ -0,0 +1,18 @@
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
int add(int x, int y);
int main(void);
int add(int x, int y) {
return (x + y);
}
int main(void) {
int sum = add(5, 3);
struct T id = identity(42);
return sum;
}

View file

@ -2,12 +2,10 @@
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
struct Point {
int x;
int y;
};
int main(void);

View file

@ -1,19 +1,21 @@
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
struct Number {
int value;
int value;
};
char *Number_show(struct Number self);
char* Number_show(struct Number self);
int main(void);
char *Number_show(struct Number self) { return "number"; }
char* Number_show(struct Number self) {
return "number";
}
int main(void) {
struct Number number = (struct Number){.value = 40};
Number_show(number);
return 0;
struct Number number = (struct Number){ .value = 40 };
Number_show(number);
return 0;
}