You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

19 lines
456 B

  1. #include <float.h>
  2. #include <limits.h>
  3. #include <stdio.h>
  4. int main() {
  5. int i = INT_MAX;
  6. unsigned short us = USHRT_MAX;
  7. long l = LONG_MAX;
  8. float f = FLT_MAX;
  9. double d = DBL_MAX;
  10. printf("int: %lu, %d\n"
  11. "unsigned short: %lu, %hu\n"
  12. "long: %lu, %ld\n"
  13. "float: %lu, %f\n"
  14. "double: %lu, %lf\n",
  15. sizeof(i), i, sizeof(us), us, sizeof(l), l, sizeof(f), f, sizeof(d),
  16. d);
  17. }