fork download
  1. #include <stdio.h>
  2. #define tyu8 unsigned int
  3. union
  4. {
  5. tyu8 fiu8TransmitType; // |I/G|T3|RS| - 0 - |
  6. struct TransmitType
  7. {
  8. tyu8 fiu8IndividualOrGroup : 1; // Individual or Group message
  9. tyu8 fiu8Type3 : 1; // Type 3 message (with Ack)
  10. tyu8 fiu8Resynch : 1; // Type 3 resynchronization required
  11. tyu8 fiu8NotUsed : 5; // Not used
  12. }sTransmitTypeBits;
  13. }unTransmitType;
  14.  
  15. int main(void) {
  16. printf("Sizeof Union = %d ", sizeof(unTransmitType));
  17. // your code goes here
  18. return 0;
  19. }
  20.  
Success #stdin #stdout 0s 2160KB
stdin
Standard input is empty
stdout
Sizeof Union = 4