Advertisement
frankchang0125

Untitled

Oct 18th, 2012
3,090
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.52 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. extern unsigned long test;
  4. extern unsigned long test_inst_1;
  5. extern void test_inst_2(void);
  6. extern void test_assembly(void);
  7.  
  8. int main()
  9. {
  10.         unsigned long test_val_c;
  11.         void *test_ptr_wrong;
  12.         void *test_ptr_correct_1;
  13.         void *test_ptr_correct_2;
  14.  
  15.         test_assembly();
  16.  
  17.         test_c = test_val;
  18.  
  19.         test_ptr_wrong = (void *) test_inst_1;
  20.         test_ptr_correct_1 = (void *) &test_inst_1;
  21.         test_ptr_correct_2 = &test_inst_2;
  22.  
  23.         return 0;
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement