fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. printf("2の文字コードは10進数=%d, 16進数=%x\n",'2','2');
  5. printf("Bの文字コードは10進数=%d, 16進数=%x\n",'B','B');
  6. printf("スペースの文字コードは10進数=%d, 16進数=%x\n",' ',' ');
  7.  
  8. return 0;
  9. }
  10.  
Success #stdin #stdout 0.01s 5288KB
stdin
Standard input is empty
stdout
2の文字コードは10進数=50, 16進数=32
Bの文字コードは10進数=66, 16進数=42
スペースの文字コードは10進数=32, 16進数=20