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 ayache, 9 years ago

D2.2: function pointers using JMP.

File size: 181 bytes
Line 
1
2int add (int x, int y) { return (x + y); }
3int mul (int x, int y) { return (x * y); }
4
5int 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.