fork download
  1. #include <stdio.h>
  2.  
  3. int main(void) {
  4. // your code goes here
  5.  
  6. printf("int %%d %d %d to %d",
  7. sizeof(int),INT_MIN,INT_MAX);
  8. printf("\nchar %%d %d %d to %d",
  9. sizeof(char),CHAR_MIN,CHAR_MAX);
  10. printf("\nlong %%d %d %d to %d",
  11. sizeof(long),LONG_MIN,LONG_MAX);
  12. printf("\nshort char %%d %d %d to %d",
  13. sizeof(short char),SCHAR_MIN,SCHAR_MAX);
  14. printf("\nint %%d %d %d to %d",
  15. sizeof(short),SHRT_MIN,SHRT_MAX);
  16. return 0;
  17. }
  18.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.c: In function ‘main’:
prog.c:7:13: error: ‘INT_MIN’ undeclared (first use in this function)
 sizeof(int),INT_MIN,INT_MAX);
             ^~~~~~~
prog.c:7:13: note: each undeclared identifier is reported only once for each function it appears in
prog.c:7:21: error: ‘INT_MAX’ undeclared (first use in this function)
 sizeof(int),INT_MIN,INT_MAX);
                     ^~~~~~~
prog.c:9:14: error: ‘CHAR_MIN’ undeclared (first use in this function)
 sizeof(char),CHAR_MIN,CHAR_MAX);
              ^~~~~~~~
prog.c:9:23: error: ‘CHAR_MAX’ undeclared (first use in this function)
 sizeof(char),CHAR_MIN,CHAR_MAX);
                       ^~~~~~~~
prog.c:11:14: error: ‘LONG_MIN’ undeclared (first use in this function)
 sizeof(long),LONG_MIN,LONG_MAX);
              ^~~~~~~~
prog.c:11:23: error: ‘LONG_MAX’ undeclared (first use in this function)
 sizeof(long),LONG_MIN,LONG_MAX);
                       ^~~~~~~~
prog.c:13:14: error: both ‘short’ and ‘char’ in declaration specifiers
 sizeof(short char),SCHAR_MIN,SCHAR_MAX);
              ^~~~
prog.c:13:20: error: ‘SCHAR_MIN’ undeclared (first use in this function)
 sizeof(short char),SCHAR_MIN,SCHAR_MAX);
                    ^~~~~~~~~
prog.c:13:30: error: ‘SCHAR_MAX’ undeclared (first use in this function)
 sizeof(short char),SCHAR_MIN,SCHAR_MAX);
                              ^~~~~~~~~
prog.c:15:15: error: ‘SHRT_MIN’ undeclared (first use in this function)
 sizeof(short),SHRT_MIN,SHRT_MAX);
               ^~~~~~~~
prog.c:15:24: error: ‘SHRT_MAX’ undeclared (first use in this function)
 sizeof(short),SHRT_MIN,SHRT_MAX);
                        ^~~~~~~~
stdout
Standard output is empty