fork(1) download
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. void main(){
  5.  
  6. printf("00num = %d\r\n", (int)3.2+9+1.8);
  7. printf("01num = %f\r\n", (int)3.2+9+1.8);
  8. printf("02num = %f\r\n", 3.2+3+1.8);
  9.  
  10. printf("1num = %.2d\r\n", 3.2+1.8);
  11. printf("2num = %02.3d\r\n", 1.1+1.2);
  12. printf("3num = %d\r\n", 1.2+1.6);
  13. printf("4num = %d\r\n", 0.3+1.2);
  14. printf("5num = %d\r\n", 3.2+3+1.8);
  15.  
  16. printf("6num = %d\r\n", (int) (3.2+3+1.8));
  17. printf("7num = %d\r\n", (int)3.2);
  18. printf("8num = %d\r\n", 3.2);
  19.  
  20. printf("9num = %d\r\n", (int)2);
  21. printf("10num = %d\r\n", (int)2.8);
  22. system("pause");
  23. }
  24.  
Success #stdin #stdout #stderr 0s 9432KB
stdin
Standard input is empty
stdout
00num = -47112104
01num = 13.800000
02num = 8.000000
1num = 00
2num = 000
3num = 0
4num = 0
5num = 0
6num = 8
7num = 3
8num = 0
9num = 2
10num = 2
stderr
sh: 1: pause: not found