Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdlib.h>
- #define ARRAY_AT(array , i, elem_size)
- *((void **)((((void *)array) + i * elem_size)))
- int main(int argc, char **argv) {
- long array[5] ={1,2,3,4,5};
- long a = ARRAY_AT(array , 2, sizeof(long)); // a = 3
- return 0;
- }
Add Comment
Please, Sign In to add comment