If v4full is a pointer, then the line
uint32_t *v4full;
v4full=( uint32_t)&v4;
Should give an error or at least a warning to the compiler. Maybe you want to do
uint32_t *v4full;
v4full=( uint32_t *) v4;
, v4
uint8
. , ...
, , , , .
, , , , , . : , ?
#include <stdio.h>
#include <inttypes.h>
int main(void) {
uint8_t v4[4] = {1,2,3,4};
uint32_t *allOfIt;
allOfIt = (uint32_t*)v4;
printf("the number is %08x\n", *allOfIt);
}
:
the number is 04030201
. - 04030201
01020304
, /. , ( x86) . , , ( , [0] ), @bvj - 32- .
, , ( CPU).