1. Examples are as follows:
char my_array[10];
*(int *)my_array = 0xaabbccdd;
2. Modify the following to solve this problem:
char my_array[10];
int tmp = 0xaabbccdd;
memcpy(my_array, &tmp, sizeof(tmp));
1. Examples are as follows:
char my_array[10];
*(int *)my_array = 0xaabbccdd;
2. Modify the following to solve this problem:
char my_array[10];
int tmp = 0xaabbccdd;
memcpy(my_array, &tmp, sizeof(tmp));