fork download
  1. #include <stdio.h>
  2. #include <stdint.h>
  3.  
  4. int main(void)
  5. {
  6. uint8_t small = 1; // 0x01
  7. uint16_t medium = 257; //0x0101
  8. uint32_t large = 65537; //0x00010001
  9.  
  10. if(small == (uint8_t)medium){printf("small = medium\r\n");}
  11. if(small == (uint8_t)large){printf("small = large\r\n");}
  12.  
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 5288KB
stdin
Standard input is empty
stdout
small = medium
small = large