1void f(void (*a)()) {
2 a();
3}
4
5void test() {
6 printf("hello world\n");
7}
8
9int main() {
10 f(&test);
11 return 0;
12}
13
1#include <stdio.h>
2#include <stdlib.h>
3#include <math.h>
4void add(int* a, int* b, int* c)
5{
6 *c = *a + *b;
7}
8int main()
9{
10 int a, b, c;
11 a = 3;
12 b = 5;
13 add(&a, &b, &c);
14 printf("%d", c);
15}