source:
Deliverables/D2.2/8051/tests/tmp_tests/Frontend/function_pointers.c
@
1525
Last change on this file since 1525 was 1525, checked in by , 9 years ago | |
---|---|
File size: 181 bytes |
Line | |
---|---|
1 | |
2 | int add (int x, int y) { return (x + y); } |
3 | int mul (int x, int y) { return (x * y); } |
4 | |
5 | int main () { |
6 | int x = 5, y = 6; |
7 | int (*f) (int, int); |
8 | |
9 | f = &add; |
10 | |
11 | return (f(x, y)); |
12 | } |
Note: See TracBrowser
for help on using the repository browser.