Guest User

Untitled

a guest
Feb 21st, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int x2 (int n ) { return n*2; }
  4. int x4 (int n ) { return n*4; }
  5.  
  6. int (*op[])(int) = {
  7. x2,
  8. x4
  9. };
  10.  
  11. #define A(n) a##n
  12.  
  13. int main () {
  14. int a1 = 1;
  15. int a2 = 2;
  16. int a3 = 3;
  17.  
  18. printf("%d\n", A(3));
  19. printf("%d\n", A(2));
  20. printf("%d\n", A(1));
  21. }
Add Comment
Please, Sign In to add comment