Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // by Cooler_
- #include <stdio.h>
- #define num_elements(array) (sizeof(array) / sizeof *(array))
- int main()
- {
- int x[] = {1,2,7,0,0,1};
- char *w[] = {"0x0FF","0x0a","0x90","0x80"};
- printf("int %d , strings %d \n",num_elements(x),num_elements(w));
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment