fork(2) download
  1. #include <stdio.h>
  2. #include <inttypes.h>
  3.  
  4. int main(void) {
  5.  
  6. short a = 32767;
  7. short b = 1;
  8.  
  9. int c = a + b;
  10. short d = a + b;
  11. printf("int c = %d ",c);
  12. printf("short d = %d",d);
  13. return 0;
  14. }
  15.  
Success #stdin #stdout 0s 2168KB
stdin
Standard input is empty
stdout
int c = 32768   short d = -32768