c-compiler/test.c
2026-04-15 18:40:26 +03:00

28 lines
456 B
C

void printf(char*, ...);
int fibonacci(int n) {
if (n < 2)
return 1;
return fibonacci(n - 1) + fibonacci(n - 2);
}
void change_first(char otus[5]) {
otus[0] = 115;
}
struct Otus {
int field
};
int main() {
char text[29] = "10th fibonacci number is %d!";
printf(text, fibonacci(10));
char somelist[5] = { 1, 2, 3, 4, 5 };
change_first(somelist);
printf(" first element: %d!", somelist[0]);
return 0;
}