fork(1) download
  1. // #include <stdio.h>
  2. // int main()
  3. // {
  4. // printf("%f\n",1.237);
  5. // printf("%.3f\n",1.237);
  6. // printf("%.2f\n",1.237);
  7. // return 0;
  8. // }
  9. // #include <stdio.h>
  10. // int main()
  11. // {
  12. // printf("%10.3f\n",12.34);
  13. // return 0;
  14. // }
  15.  
  16. // #include <stdio.h>
  17. // int main()
  18. // {
  19. // printf("%d\n",12);
  20. // printf("%+d\n",12);
  21. // printf("%-d\n",-12);
  22. // printf("%-d\n",12);
  23. // printf("%d\n",-12);
  24. // return 0;
  25. // }
  26.  
  27. #include <stdio.h>
  28. int main()
  29. {
  30. char abcdef[] = "abcdef";
  31. printf("%s\n",abcdef);
  32. printf("%.3s\n",abcdef);
  33. return 0;
  34. }
Success #stdin #stdout 0s 5316KB
stdin
Standard input is empty
stdout
abcdef
abc