Personal space is a natural right! Even animals has this right except farm animals.
If you know that sizeof(float) >= sizeof(int) the memory alignment should be fine. Also in this case * (int* )&a does not access any bytes outside of an defined data object. To predict the outcome one have to know the…
Another interesting thing to know about pointer and arrays is: #include <stdio.h> typedef int a_t[100]; int main(void) { int a[100]; a_t* p = &a; // all printed pointer values are equal printf("%p %p %p %p\n", (void*)a,…
(See http://pastebin.com/KypbginU) // corrected overflow hget for (int k2=k,o=0; t[k&(SIZE-1)] && **t[k&(SIZE-1)] != k2 && o<SIZE; ++k,++o); return t+(k&(SIZE-1)); // hset now allows overwrite for (int (**a)[2] =…
Personal space is a natural right! Even animals has this right except farm animals.
If you know that sizeof(float) >= sizeof(int) the memory alignment should be fine. Also in this case * (int* )&a does not access any bytes outside of an defined data object. To predict the outcome one have to know the…
Another interesting thing to know about pointer and arrays is: #include <stdio.h> typedef int a_t[100]; int main(void) { int a[100]; a_t* p = &a; // all printed pointer values are equal printf("%p %p %p %p\n", (void*)a,…
(See http://pastebin.com/KypbginU) // corrected overflow hget for (int k2=k,o=0; t[k&(SIZE-1)] && **t[k&(SIZE-1)] != k2 && o<SIZE; ++k,++o); return t+(k&(SIZE-1)); // hset now allows overwrite for (int (**a)[2] =…