fork download
  1. #include<stdio.h>
  2.  
  3. int main (int argc, char* argv){
  4. int hex = 0xFF;
  5.  
  6. printf("Valor inteiro: %i \n", hex);
  7. printf("Valor hex: %x \n", hex);
  8. printf("Valor hex (maiusculo): %X \n", hex);
  9. printf("Valor hex (4 casas): %4x \n", hex);
  10. printf("Valor hex (Completar com zeros): %04x \n", hex);
  11.  
  12. return 0;
  13. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
Valor inteiro: 255 
Valor hex: ff 
Valor hex (maiusculo): FF 
Valor hex (4 casas):   ff 
Valor hex (Completar com zeros): 00ff