fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. printf("sizeof('A'): %d\r\n", (int)sizeof('A'));
  5. printf("sizeof(char): %d\r\n", (int)sizeof(char));
  6. printf("sizeof(short): %d\r\n", (int)sizeof(short));
  7. printf("sizeof(int): %d\r\n", (int)sizeof(int));
  8. printf("sizeof(long): %d\r\n", (int)sizeof(long));
  9. printf("sizeof(long long): %d\r\n", (int)sizeof(long long));
  10.  
  11. return 0;
  12. }
Success #stdin #stdout 0.01s 1676KB
stdin
Standard input is empty
stdout
sizeof('A'): 4
sizeof(char): 1
sizeof(short): 2
sizeof(int): 4
sizeof(long): 4
sizeof(long long): 8