-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.c
38 lines (26 loc) · 773 Bytes
/
test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <string.h>
int (*ptr_to_func_taking_char_and_float_and_returning_int)(char, float);
int (**ptr_to_ptr_to_func_taking_char_and_float_and_returning_int)(char, float);
volatile int c;
int func1(char a, float b) {
printf("ALLO %c %f!\n", a, b);
return 0;
}
struct bobby {
char tables;
int roflmao;
};
const float xxx() {
return 1.2f;
}
int main() {
struct bobby a;
a.roflmao = 3;
xxx();
ptr_to_func_taking_char_and_float_and_returning_int = func1;
ptr_to_ptr_to_func_taking_char_and_float_and_returning_int = &ptr_to_func_taking_char_and_float_and_returning_int;
ptr_to_func_taking_char_and_float_and_returning_int('a', 1.0f);
(*ptr_to_ptr_to_func_taking_char_and_float_and_returning_int)('b', 2.0f);
return a.roflmao;
}