I am wondering if it is possible in C to overwrite the contents of one array with another, and by doing so, how do I work around with the loss of array size?
Say I have two arrays.
int a[] = {1,2,3,4,6,7,8};
int b[] = {1,6};
// How can I overwrite the array a with array b, so get the following?:
a[] = {1,6};
memcpy(a, b, sizeof(b)); memset(a + (sizeof(b) / sizeof(b[0])), 0, sizeof(a) - sizeof(b));