• sizeof struct
    I have a struct with 2 members of type double and 1 member of type long. The sizeof() function returns 24. Normaly it should be 20(2*8bytes for the doubles and 4 bytes for the long). When I add...
  • elements of XHUGE structs
    Hi Folks, I do have some trouble with huge memory model and xhuge structures. I wonder, how is it with structures of type xhuge, which constists of a lot of sub- structure types: struct big ...
  • Address of an element of a struct
    I have this code: typedef struct _DLL_struct { unsigned char DLL_type; unsigned char DLL_lenght; unsigned char DLL_data_begin; } DLL_struct; unsigned char xdata FskRxBuf[MAX_SIZE_BUFFER]; ...
  • sizeof of struct with bit Field
    please explain me why the sizeof (C51) returns 6 bytes for this struct instead of 5: typedef struct DEKO_COMM_HEADER { UINT16 m_uiMsgOpcode; UCHAR8 m_sblMsgPriority :2; UINT16 m_sblDataLength...
  • Designated initialiser of struct element in C51
    Why designated initialisation not working in C51? How to initialise structure lement? struct fixed { unsigned char a; unsigned char b; }; code struct fixed flash = {.a=0x2, .b=0x3}; Above...