I have a question to the conversion of int array to char*. The following code has the output 23. But I don't really understand why. Can someone explain it to me?
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(){
uint32_t x;
uint32_t* p = (uint32_t*) malloc(sizeof(uint32_t));
uint32_t array[9] = {42, 5, 23, 82, 127, 21, 324, 3, 8};
*p = *((char*)array+8);
printf("1: %d\n", *p);
return 0;
}