how to cast an int array to a byte array in C
问题 hey i would like to know how you could cast an Int array in C to an byte array and what would be the declaration method. I would appreciate if it is simpler and no use of pointers. thanks for the comments ex: int addr[500] to byte[] Plus I would also want the ending byte array to have the same array name. 回答1: If you are trying to reinterpret the memory behind the int array as an array of bytes, and only then: int ints[500]; char *bytes = (char *) ints; You cannot do this without resorting to